summaryrefslogtreecommitdiff
path: root/example2
diff options
context:
space:
mode:
Diffstat (limited to 'example2')
-rw-r--r--example2/Makefile3
-rw-r--r--example2/main.go11
2 files changed, 14 insertions, 0 deletions
diff --git a/example2/Makefile b/example2/Makefile
new file mode 100644
index 0000000..250e900
--- /dev/null
+++ b/example2/Makefile
@@ -0,0 +1,3 @@
+all:
+ go build
+ ./example2
diff --git a/example2/main.go b/example2/main.go
new file mode 100644
index 0000000..d8f39b4
--- /dev/null
+++ b/example2/main.go
@@ -0,0 +1,11 @@
+package main
+
+import "log"
+import "fmt"
+import "git.wit.com/wit/shell"
+
+func main() {
+ tmp, output, err := shell.Run("cat /etc/issue")
+ log.Println("cat /etc/issue returned", tmp, "error =", err)
+ fmt.Print(output)
+}