MCPcopy
hub / github.com/github/git-sizer / seqFunction

Function seqFunction

internal/pipe/pipeline_test.go:429–442  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

427}
428
429func seqFunction(n int) pipe.Stage {
430 return pipe.Function(
431 "seq",
432 func(_ context.Context, _ pipe.Env, _ io.Reader, stdout io.Writer) error {
433 for i := 1; i <= n; i++ {
434 _, err := fmt.Fprintf(stdout, "%d\n", i)
435 if err != nil {
436 return err
437 }
438 }
439 return nil
440 },
441 )
442}
443
444func TestPipelineWithLinewiseFunction(t *testing.T) {
445 t.Parallel()

Calls 1

FunctionFunction · 0.92

Tested by

no test coverage detected