From 156877f3c99b54c78e3cae111542f5519a97a68a Mon Sep 17 00:00:00 2001 From: Andrei Belov Date: Thu, 19 Oct 2017 18:23:32 +0300 Subject: Introduced deb packages building tools. --- pkg/deb/debian/unit.example-go-app | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pkg/deb/debian/unit.example-go-app (limited to 'pkg/deb/debian/unit.example-go-app') diff --git a/pkg/deb/debian/unit.example-go-app b/pkg/deb/debian/unit.example-go-app new file mode 100644 index 00000000..ef2568ec --- /dev/null +++ b/pkg/deb/debian/unit.example-go-app @@ -0,0 +1,20 @@ +package main + +import ( + "fmt" + "net/http" + "unit" +) + +func handler(w http.ResponseWriter, r *http.Request) { + w.Header().Add("Content-Type", "text/plain"); + + fmt.Fprintf(w, "Method : %s\n", r.Method) + fmt.Fprintf(w, "URL : %s\n", r.URL.Path) + fmt.Fprintf(w, "Host : %s\n", r.Host) +} + +func main() { + http.HandleFunc("/", handler) + unit.ListenAndServe("8000", nil) +} -- cgit