package routes import ( "log" "net/http" ) func serverError(w http.ResponseWriter, err error) { code := http.StatusInternalServerError log.Printf("received error: {%v}", err) http.Error(w, http.StatusText(code), code) } func methodNotAllowedHandler(w http.ResponseWriter, r *http.Request) { code := http.StatusMethodNotAllowed http.Error(w, http.StatusText(code), code) } func notFoundHandler(w http.ResponseWriter, r *http.Request) { code := http.StatusNotFound http.Error(w, http.StatusText(code), code) }