package routers import ( "html/template" "net/http" ) var err404tpl = ` {{.Title}}
{{.Title}}
` // show 404 notfound error. func notFound(rw http.ResponseWriter, r *http.Request) { t, _ := template.New("error").Parse(err404tpl) data := map[string]interface{}{ "Title": http.StatusText(404), } t.Execute(rw, data) }