diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-22 13:44:03 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-22 13:44:03 +0800 |
commit | 99fd8a9cf96a51fcd9e50445cb035cc9ecd012de (patch) | |
tree | 077812874d2650216549048524886059391b5d45 /http_handle_index.go | |
parent | Initial linting (diff) | |
download | forge-99fd8a9cf96a51fcd9e50445cb035cc9ecd012de.tar.gz forge-99fd8a9cf96a51fcd9e50445cb035cc9ecd012de.tar.zst forge-99fd8a9cf96a51fcd9e50445cb035cc9ecd012de.zip |
Variable name lengths
Diffstat (limited to 'http_handle_index.go')
-rw-r--r-- | http_handle_index.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/http_handle_index.go b/http_handle_index.go index 360c033..16d343a 100644 --- a/http_handle_index.go +++ b/http_handle_index.go @@ -10,13 +10,13 @@ import ( "github.com/dustin/go-humanize" ) -func httpHandleIndex(w http.ResponseWriter, r *http.Request, params map[string]any) { +func httpHandleIndex(writer http.ResponseWriter, request *http.Request, params map[string]any) { var err error var groups []nameDesc - groups, err = queryNameDesc(r.Context(), "SELECT name, COALESCE(description, '') FROM groups WHERE parent_group IS NULL") + groups, err = queryNameDesc(request.Context(), "SELECT name, COALESCE(description, '') FROM groups WHERE parent_group IS NULL") if err != nil { - http.Error(w, "Error querying groups: "+err.Error(), http.StatusInternalServerError) + http.Error(writer, "Error querying groups: "+err.Error(), http.StatusInternalServerError) return } params["groups"] = groups @@ -25,5 +25,5 @@ func httpHandleIndex(w http.ResponseWriter, r *http.Request, params map[string]a memstats := runtime.MemStats{} //exhaustruct:ignore runtime.ReadMemStats(&memstats) params["mem"] = humanize.IBytes(memstats.Alloc) - renderTemplate(w, "index", params) + renderTemplate(writer, "index", params) } |