WithReader sets the pipe's input reader to r. Once r has been completely read, it will be closed if necessary.
(r io.Reader)
| 994 | // WithReader sets the pipe's input reader to r. Once r has been completely |
| 995 | // read, it will be closed if necessary. |
| 996 | func (p *Pipe) WithReader(r io.Reader) *Pipe { |
| 997 | p.Reader = NewReadAutoCloser(r) |
| 998 | return p |
| 999 | } |
| 1000 | |
| 1001 | // WithStderr sets the standard error output for [Pipe.Exec] or |
| 1002 | // [Pipe.ExecForEach] commands to w, instead of the pipe. |