summaryrefslogtreecommitdiff
path: root/getuuid.go
diff options
context:
space:
mode:
authorNikolaus Gotsche <n@softwarefools.com>2017-09-24 22:51:36 +0200
committerNikolaus Gotsche <n@softwarefools.com>2017-09-24 22:51:36 +0200
commit7e33d4d446d6b7d9a136290993363f833fc13908 (patch)
treedd7ee817baecdbf7105862a3e1ce5277020323b4 /getuuid.go
First Commit of Project Hexfool
getuuid - Demonstration how linux's uuidgen can be used in go jsonrest - api for restful json usage signup - login on top of an mysql db
Diffstat (limited to 'getuuid.go')
-rw-r--r--getuuid.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/getuuid.go b/getuuid.go
new file mode 100644
index 0000000..b9cb7ae
--- /dev/null
+++ b/getuuid.go
@@ -0,0 +1,15 @@
+package main
+
+import (
+ "fmt"
+ "log"
+ "os/exec"
+)
+
+func main() {
+ out,err := exec.Command("uuidgen").Output()
+ if err != nil {
+ log.Fatal(err)
+ }
+ fmt.Printf("%s", out)
+}