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 +}