package main import ( "fmt" "log" "net/http" ) func root( w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "It's the root ! [%s]{{%s}}", r.URL.Path[1:], r.Method) } func main() { http.HandleFunc("/", root) log.Fatal(http.ListenAndServe(":8080", nil)) }