github.com/profzone/eden-framework@v1.0.10/pkg/courier/httpx/cookie.go (about) 1 package httpx 2 3 import ( 4 "net/http" 5 ) 6 7 type ICookie interface { 8 Cookies() *http.Cookie 9 } 10 11 type WithCookie struct { 12 c *http.Cookie 13 } 14 15 func (c *WithCookie) SetCookie(cookie *http.Cookie) { 16 c.c = cookie 17 } 18 19 func (c *WithCookie) Cookies() *http.Cookie { 20 return c.c 21 }