From 19fa57e67bcc4af13a252c17c0e18adab162d2d1 Mon Sep 17 00:00:00 2001 From: Mathias Magnusson Date: Sun, 17 Nov 2024 16:49:01 +0100 Subject: more wip --- hh.go | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'hh.go') diff --git a/hh.go b/hh.go index e6593ed..16c25d2 100644 --- a/hh.go +++ b/hh.go @@ -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 -} -- cgit v1.2.3