From 5f7e9d50f589dd826ed75a08989cc4542c51fcda Mon Sep 17 00:00:00 2001 From: arshamalh Date: Fri, 10 Jun 2022 04:34:04 +0430 Subject: [PATCH] type of returned cookies changed. --- context.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/context.go b/context.go index ef8649ca..2b1a12eb 100644 --- a/context.go +++ b/context.go @@ -898,11 +898,11 @@ func (c *Context) Cookie(name string) (string, error) { } // Cookies parses and returns the HTTP cookies sent with the request. -func (c *Context) Cookies() []string { - var cookies []string +func (c *Context) Cookies() map[string]string { + cookies := make(map[string]string) for _, cookie := range c.Request.Cookies() { val, _ := url.QueryUnescape(cookie.Value) - cookies = append(cookies, val) + cookies[cookie.Name] = val } return cookies }