commit 16dc72f1bfeb4e4f0701e3bf1fc2357af8a8e64e Author: Lomanic Date: Sun Oct 4 21:19:42 2020 +0200 Inital go version diff --git a/README.md b/README.md new file mode 100644 index 0000000..b2cfa0c --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +Presence button +=============== + +See https://wiki.fuz.re/doku.php?id=projets:fuz:presence_button \ No newline at end of file diff --git a/main.go b/main.go new file mode 100644 index 0000000..676d5a7 --- /dev/null +++ b/main.go @@ -0,0 +1,16 @@ +package main + +import ( + "fmt" + "log" + "net/http" +) + +func handler(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:]) +} + +func main() { + http.HandleFunc("/", handler) + log.Fatal(http.ListenAndServe(":8080", nil)) +}