aboutsummaryrefslogtreecommitdiff
path: root/http_handle_login.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-22 13:17:55 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-22 13:32:35 +0800
commit7a6f71ac73b41a38e9982bea3d46a87c327bd77a (patch)
tree92d5b637f57080af40c2f42834282df58a4e21a3 /http_handle_login.go
parentfedauth: Use NewRequestWithContext (diff)
downloadforge-7a6f71ac73b41a38e9982bea3d46a87c327bd77a.tar.gz
forge-7a6f71ac73b41a38e9982bea3d46a87c327bd77a.tar.zst
forge-7a6f71ac73b41a38e9982bea3d46a87c327bd77a.zip
Initial linting
Diffstat (limited to 'http_handle_login.go')
-rw-r--r--http_handle_login.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/http_handle_login.go b/http_handle_login.go
index 1c5c066..c6c1be1 100644
--- a/http_handle_login.go
+++ b/http_handle_login.go
@@ -26,7 +26,7 @@ func httpHandleLogin(w http.ResponseWriter, r *http.Request, params map[string]a
var expiry time.Time
var cookie http.Cookie
- if r.Method != "POST" {
+ if r.Method != http.MethodPost {
renderTemplate(w, "login", params)
return
}
@@ -80,8 +80,7 @@ func httpHandleLogin(w http.ResponseWriter, r *http.Request, params map[string]a
Secure: false, // TODO
Expires: expiry,
Path: "/",
- // TODO: Expire
- }
+ } //exhaustruct:ignore
http.SetCookie(w, &cookie)