MCPcopy
hub / github.com/bitfield/script / WithReader

Method WithReader

script.go:996–999  ·  view source on GitHub ↗

WithReader sets the pipe's input reader to r. Once r has been completely read, it will be closed if necessary.

(r io.Reader)

Source from the content-addressed store, hash-verified

994// WithReader sets the pipe's input reader to r. Once r has been completely
995// read, it will be closed if necessary.
996func (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.

Callers 15

ConcatMethod · 0.95
EchoMethod · 0.95
FilterMethod · 0.95
TeeMethod · 0.95
EchoFunction · 0.80
FileFunction · 0.80
StdinFunction · 0.80

Calls 1

NewReadAutoCloserFunction · 0.85