From 1df0b80c1f02045373f064c4534081fd2a45beca Mon Sep 17 00:00:00 2001 From: Paul Wilde Date: Sun, 15 Aug 2021 20:57:30 +0100 Subject: [PATCH] created gitversion branch --- src/main.go | 20 ++++++++++++++++++++ structs/structs.go | 4 ++++ 2 files changed, 24 insertions(+) create mode 100644 src/main.go create mode 100644 structs/structs.go diff --git a/src/main.go b/src/main.go new file mode 100644 index 0000000..bcb977f --- /dev/null +++ b/src/main.go @@ -0,0 +1,20 @@ +package main + +import ( + "fmt" + "net/http" + "log" +) + +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)) +} + +func do_this(){ + fmt.Println("doing this") +} diff --git a/structs/structs.go b/structs/structs.go new file mode 100644 index 0000000..c00292e --- /dev/null +++ b/structs/structs.go @@ -0,0 +1,4 @@ +type Page struct { + Title string + Body []byte +}