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

Function ExampleIfExists_true

script_test.go:2236–2240  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2234}
2235
2236func ExampleIfExists_true() {
2237 script.IfExists("./testdata/hello.txt").Echo("found it").Stdout()
2238 // Output:
2239 // found it
2240}
2241
2242func ExampleIfExists_false() {
2243 script.IfExists("doesntexist").Echo("found it").Stdout()

Callers

nothing calls this directly

Calls 3

IfExistsFunction · 0.92
StdoutMethod · 0.80
EchoMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…