diff --git a/internal/runner/runner.go b/internal/runner/runner.go index 63ea8f0..6a84991 100644 --- a/internal/runner/runner.go +++ b/internal/runner/runner.go @@ -28,6 +28,8 @@ func (runner *ZRunner) Run(ctx context.Context, command string, formatArgs ...an return cmd.CombinedOutput() } +// Pipeline accepts a slice of [exec.Cmd] and pipes them together +// then returns the result of the final command func Pipeline(cmds ...*exec.Cmd) ([]byte, error) { for i := 0; i < len(cmds)-1; i++ { stdout, err := cmds[i].StdoutPipe()