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

Function ExampleSlice

script_test.go:2633–2640  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2631}
2632
2633func ExampleSlice() {
2634 input := []string{"1", "2", "3"}
2635 script.Slice(input).Stdout()
2636 // Output:
2637 // 1
2638 // 2
2639 // 3
2640}
2641
2642// A string containing a line longer than bufio.MaxScanTokenSize, for testing
2643// methods that buffer input. We want to make sure they don't throw

Callers

nothing calls this directly

Calls 2

SliceFunction · 0.92
StdoutMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…