Echo sets the pipe's reader to one that produces the string s, detaching any existing reader without draining or closing it.
(s string)
| 365 | // Echo sets the pipe's reader to one that produces the string s, detaching any |
| 366 | // existing reader without draining or closing it. |
| 367 | func (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. |
| 375 | func (p *Pipe) EncodeBase64() *Pipe { |