WithStderr sets the standard error output for [Pipe.Exec] or [Pipe.ExecForEach] commands to w, instead of the pipe.
(w io.Writer)
| 1001 | // WithStderr sets the standard error output for [Pipe.Exec] or |
| 1002 | // [Pipe.ExecForEach] commands to w, instead of the pipe. |
| 1003 | func (p *Pipe) WithStderr(w io.Writer) *Pipe { |
| 1004 | p.mu.Lock() |
| 1005 | defer p.mu.Unlock() |
| 1006 | p.stderr = w |
| 1007 | return p |
| 1008 | } |
| 1009 | |
| 1010 | // WithStdout sets the pipe's standard output to the writer w, instead of the |
| 1011 | // default [os.Stdout]. |
no outgoing calls