diff options
author | Mathias Magnusson <mathias@magnusson.space> | 2024-11-17 16:49:01 +0100 |
---|---|---|
committer | Mathias Magnusson <mathias@magnusson.space> | 2024-11-17 16:49:01 +0100 |
commit | 19fa57e67bcc4af13a252c17c0e18adab162d2d1 (patch) | |
tree | 404de62432062ddeb19c675c96856f966e3e2a79 /hh.go | |
parent | 72440d0e3b2a8224b65491202798f5c0b18a2dde (diff) | |
download | hh-19fa57e67bcc4af13a252c17c0e18adab162d2d1.tar.gz |
more wip
Diffstat (limited to 'hh.go')
-rw-r--r-- | hh.go | 13 |
1 files changed, 0 insertions, 13 deletions
@@ -1,14 +1 @@ package hh - -import ( - "errors" - "net/http" -) - -func Cookie(r http.Request, name string) (string, error) { - cookie, _ := r.Cookie(name) - if cookie == nil { - return "", errors.New("Bad request: missing cookie " + name) - } - return cookie.Value, nil -} |