package routing import ( "net/http" "lishwist/error" ) func NotFoundJson(w http.ResponseWriter, r *http.Request) { w.Header().Add("Content-Type", "application/json; charset=utf-8") w.WriteHeader(http.StatusNotFound) _, _ = w.Write([]byte(`{"GeneralError":"Not Found"}`)) } func NotFound(w http.ResponseWriter, r *http.Request) { error.Page(w, "404 -- Page not found", http.StatusNotFound, nil) }