aboutsummaryrefslogtreecommitdiff
path: root/http_handle_index.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-05 08:51:17 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-05 08:51:17 +0800
commit7c341685f878aa8fd4c49788cf8cc0d8c5c6e127 (patch)
tree5295f1f4020e85c065e98fcb88ec217ad66e078a /http_handle_index.go
parentconfig: Add explanatory comments (diff)
downloadforge-7c341685f878aa8fd4c49788cf8cc0d8c5c6e127.tar.gz
forge-7c341685f878aa8fd4c49788cf8cc0d8c5c6e127.tar.zst
forge-7c341685f878aa8fd4c49788cf8cc0d8c5c6e127.zip
*: Replace some := with var
Diffstat (limited to 'http_handle_index.go')
-rw-r--r--http_handle_index.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/http_handle_index.go b/http_handle_index.go
index 9d424c7..f710315 100644
--- a/http_handle_index.go
+++ b/http_handle_index.go
@@ -8,7 +8,10 @@ import (
)
func handle_index(w http.ResponseWriter, r *http.Request, params map[string]any) {
- groups, err := query_name_desc_list(r.Context(), "SELECT name, COALESCE(description, '') FROM groups")
+ var err error
+ var groups []name_desc_t
+
+ groups, err = query_name_desc_list(r.Context(), "SELECT name, COALESCE(description, '') FROM groups")
if err != nil {
http.Error(w, "Error querying groups: "+err.Error(), http.StatusInternalServerError)
return