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

Function ExamplePipe_Tee_stdout

script_test.go:2599–2608  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2597}
2598
2599func ExamplePipe_Tee_stdout() {
2600 s, err := script.Echo("hello\n").Tee().String()
2601 if err != nil {
2602 panic(err)
2603 }
2604 fmt.Println(s)
2605 // Output:
2606 // hello
2607 // hello
2608}
2609
2610func ExamplePipe_Tee_writers() {
2611 buf1, buf2 := new(bytes.Buffer), new(bytes.Buffer)

Callers

nothing calls this directly

Calls 3

EchoFunction · 0.92
StringMethod · 0.80
TeeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…