diff options
| author | Jeff Carr <[email protected]> | 2024-03-09 17:46:36 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-03-09 17:46:36 -0600 |
| commit | fe94c0057bd0c44317f22afeb0fe8432e0b18c64 (patch) | |
| tree | 7d9041456dc538ce592981344403cda7197d3441 /example1/main.go | |
| parent | f163738c86b84d8b6ddf12326d835de0191834bd (diff) | |
remove some of the wierder code
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'example1/main.go')
| -rw-r--r-- | example1/main.go | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/example1/main.go b/example1/main.go deleted file mode 100644 index f9998a5..0000000 --- a/example1/main.go +++ /dev/null @@ -1,43 +0,0 @@ -package main - -/* -import "log" -import "reflect" -*/ - -import "os" - -// import "github.com/davecgh/go-spew/spew" - -import "go.wit.com/lib/gui/shell" - -func main() { - shell.Run("ls /tmp") - - shell.Run("ping -c 3 localhost") - - // slow down the polling to every 2 seconds - shell.SetDelayInMsec(2000) - - shell.Run("ping -c 4 localhost") - - // capture ping output into a file - fout, _ := os.Create("/tmp/example1.ping.stdout") - ferr, _ := os.Create("/tmp/example1.ping.stderr") - shell.SetStdout(fout) - shell.SetStderr(ferr) - - shell.Run("ping -c 5 localhost") - - // turn out process exit debugging - shell.SpewOn() - - fout, _ = os.Create("/tmp/example1.fail.stdout") - ferr, _ = os.Create("/tmp/example1.fail.stderr") - shell.SetStdout(fout) - shell.SetStderr(ferr) - - // TODO: this might not be working - // check error handling - shell.Run("ls /tmpthisisnothere") -} |
