stdErr returns the pipe's configured standard error writer for commands run via [Pipe.Exec] and [Pipe.ExecForEach]. The default is nil, which means that error output will go to the pipe.
()
| 906 | // via [Pipe.Exec] and [Pipe.ExecForEach]. The default is nil, which means that |
| 907 | // error output will go to the pipe. |
| 908 | func (p *Pipe) stdErr() io.Writer { |
| 909 | if p.mu == nil { // uninitialised pipe |
| 910 | return nil |
| 911 | } |
| 912 | p.mu.Lock() |
| 913 | defer p.mu.Unlock() |
| 914 | return p.stderr |
| 915 | } |
| 916 | |
| 917 | // Stdout copies the pipe's contents to its configured standard output (using |
| 918 | // [Pipe.WithStdout]), or to [os.Stdout] otherwise, and returns the number of |
no outgoing calls
no test coverage detected