MCPcopy Index your code
hub / github.com/bitfield/script / stdErr

Method stdErr

script.go:908–915  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

906// via [Pipe.Exec] and [Pipe.ExecForEach]. The default is nil, which means that
907// error output will go to the pipe.
908func (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

Callers 2

ExecMethod · 0.95
ExecForEachMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected