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

Function ExamplePipe_Concat

script_test.go:2273–2285  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2271}
2272
2273func ExamplePipe_Concat() {
2274 input := []string{
2275 "testdata/test.txt",
2276 "testdata/doesntexist.txt",
2277 "testdata/hello.txt",
2278 }
2279 script.Slice(input).Concat().Stdout()
2280 // Output:
2281 // This is the first line in the file.
2282 // Hello, world.
2283 // This is another line in the file.
2284 // hello world
2285}
2286
2287func ExamplePipe_CountLines() {
2288 n, err := script.Echo("a\nb\nc\n").CountLines()

Callers

nothing calls this directly

Calls 3

SliceFunction · 0.92
StdoutMethod · 0.80
ConcatMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…