From 7a6f71ac73b41a38e9982bea3d46a87c327bd77a Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 22 Mar 2025 13:17:55 +0800 Subject: Initial linting --- http_error_page.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'http_error_page.go') diff --git a/http_error_page.go b/http_error_page.go index cb9e6ed..77fdc86 100644 --- a/http_error_page.go +++ b/http_error_page.go @@ -8,18 +8,18 @@ import ( ) func errorPage404(w http.ResponseWriter, params map[string]any) { - w.WriteHeader(404) + w.WriteHeader(http.StatusNotFound) _ = templates.ExecuteTemplate(w, "404", params) } func errorPage400(w http.ResponseWriter, params map[string]any, msg string) { - w.WriteHeader(400) + w.WriteHeader(http.StatusBadRequest) params["complete_error_msg"] = msg _ = templates.ExecuteTemplate(w, "400", params) } func errorPage451(w http.ResponseWriter, params map[string]any, msg string) { - w.WriteHeader(451) + w.WriteHeader(http.StatusUnavailableForLegalReasons) params["complete_error_msg"] = msg _ = templates.ExecuteTemplate(w, "451", params) } -- cgit v1.2.3