package main import ( "fmt" "log" "net/http" ) func handler(w http.ResponseWriter, r *http.Request) { // url path: r.URL.Path[1:] } func main() { http.HandleFunc("/", handler) log.Fatal(http.ListenAndServe("127.0.0.1:8000", nil)) }