summaryrefslogtreecommitdiff
path: root/go
diff options
context:
space:
mode:
Diffstat (limited to 'go')
-rw-r--r--go/README.md6
-rw-r--r--go/cmd/hello-world/main.go7
2 files changed, 13 insertions, 0 deletions
diff --git a/go/README.md b/go/README.md
new file mode 100644
index 0000000..dfaa0da
--- /dev/null
+++ b/go/README.md
@@ -0,0 +1,6 @@
+# Go executables for gitlab-shell
+
+This directory contains Go executables for use in gitlab-shell. To add
+a new command `foobar` create a subdirectory `cmd/foobar` and put your
+code in `package main` under `cmd/foobar`. This will automatically get
+compiled into `bin/foobar` by `../bin/compile`.
diff --git a/go/cmd/hello-world/main.go b/go/cmd/hello-world/main.go
new file mode 100644
index 0000000..f7b60bd
--- /dev/null
+++ b/go/cmd/hello-world/main.go
@@ -0,0 +1,7 @@
+package main
+
+import "fmt"
+
+func main() {
+ fmt.Println("Hello, world!")
+}