package main import ( "net/http" "path/filepath" ) func Index(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, filepath.Join("html", "index.html")) } func Style(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "/html/style.css") } func Static(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, r.URL.Path) } func HTML(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, filepath.Join("html", r.URL.Path + ".html")) }