summaryrefslogtreecommitdiff
path: root/example1
diff options
context:
space:
mode:
Diffstat (limited to 'example1')
-rw-r--r--example1/Makefile3
-rwxr-xr-xexample1/example1bin0 -> 3187896 bytes
-rw-r--r--example1/main.go27
3 files changed, 30 insertions, 0 deletions
diff --git a/example1/Makefile b/example1/Makefile
new file mode 100644
index 0000000..9fc318d
--- /dev/null
+++ b/example1/Makefile
@@ -0,0 +1,3 @@
+all:
+ go build
+ ./example1
diff --git a/example1/example1 b/example1/example1
new file mode 100755
index 0000000..625385e
--- /dev/null
+++ b/example1/example1
Binary files differ
diff --git a/example1/main.go b/example1/main.go
new file mode 100644
index 0000000..4a36503
--- /dev/null
+++ b/example1/main.go
@@ -0,0 +1,27 @@
+package main
+
+/*
+import "log"
+import "reflect"
+import "os"
+*/
+
+// import "github.com/davecgh/go-spew/spew"
+
+import "git.wit.com/jcarr/shell"
+
+func main() {
+ shell.SpewOn()
+
+ shell.Run("ls /tmp")
+
+ shell.Run("ping -c 4 localhost")
+
+ // slow down the polling to every 2 seconds
+ shell.SetDelayInMsec(2000)
+ shell.Run("ping -c 4 localhost")
+
+ // TODO: this might not be working
+ // check error handling
+ shell.Run("ls /tmpthisisnothere")
+}