aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
Diffstat (limited to 'template')
-rw-r--r--template/go/base-http-server.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/template/go/base-http-server.go b/template/go/base-http-server.go
new file mode 100644
index 0000000..abe84d4
--- /dev/null
+++ b/template/go/base-http-server.go
@@ -0,0 +1,13 @@
+package main
+
+import (
+ "fmt"
+ "net/http"
+)
+
+func main() {
+ http.HandleFunc("/", func (w http.ResponseWriter, r *http.Request) {
+ fmt.Fprintf(w, "hello world")
+ })
+ http.ListenAndServe(":8080", nil)
+}