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

Method Echo

script.go:367–372  ·  view source on GitHub ↗

Echo sets the pipe's reader to one that produces the string s, detaching any existing reader without draining or closing it.

(s string)

Source from the content-addressed store, hash-verified

365// Echo sets the pipe's reader to one that produces the string s, detaching any
366// existing reader without draining or closing it.
367func (p *Pipe) Echo(s string) *Pipe {
368 if p.Error() != nil {
369 return p
370 }
371 return p.WithReader(strings.NewReader(s))
372}
373
374// EncodeBase64 produces the base64 encoding of the input.
375func (p *Pipe) EncodeBase64() *Pipe {

Calls 2

ErrorMethod · 0.95
WithReaderMethod · 0.95