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

Method WithStdout

script.go:1012–1015  ·  view source on GitHub ↗

WithStdout sets the pipe's standard output to the writer w, instead of the default [os.Stdout].

(w io.Writer)

Source from the content-addressed store, hash-verified

1010// WithStdout sets the pipe's standard output to the writer w, instead of the
1011// default [os.Stdout].
1012func (p *Pipe) WithStdout(w io.Writer) *Pipe {
1013 p.stdout = w
1014 return p
1015}
1016
1017// WriteFile writes the pipe's contents to the file path, truncating it if it
1018// exists, and returns the number of bytes successfully written, or an error.

Calls

no outgoing calls