package error import ( "lishwist/templates" "log" "net/http" ) type pageProps struct { Message string } func Page(w http.ResponseWriter, publicMessage string, status int, err error) { w.WriteHeader(status) if err != nil { log.Printf("%s --- %s\n", publicMessage, err) } templates.Execute(w, "error_page.gotmpl", pageProps{publicMessage}) }