()
| 147 | } |
| 148 | |
| 149 | func ExampleIfExists_exec() { |
| 150 | script.IfExists("./testdata/hello.txt").Exec("echo hello").Stdout() |
| 151 | // Output: |
| 152 | // hello |
| 153 | } |
| 154 | |
| 155 | func ExampleIfExists_noExec() { |
| 156 | script.IfExists("doesntexist").Exec("echo hello").Stdout() |