Slice creates a pipe containing each element of s, one per line. If s is empty or nil, then the pipe is empty.
(s []string)
| 187 | // Slice creates a pipe containing each element of s, one per line. If s is |
| 188 | // empty or nil, then the pipe is empty. |
| 189 | func Slice(s []string) *Pipe { |
| 190 | if len(s) == 0 { |
| 191 | return NewPipe() |
| 192 | } |
| 193 | return Echo(strings.Join(s, "\n") + "\n") |
| 194 | } |
| 195 | |
| 196 | // Stdin creates a pipe that reads from [os.Stdin]. |
| 197 | func Stdin() *Pipe { |
searching dependent graphs…