Documentation ¶
Overview ¶
Package cookie provides utilities for using HTTP cookies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(w http.ResponseWriter, name, domain string)
Delete removes the named cookie.
func Set ¶
func Set( w http.ResponseWriter, name string, value string, domain string, mAge time.Duration, jsAccess bool, )
Set creates a cookie on the HTTP response.
If domain is an empty string, the cookie is set for the current host(excluding subdomains) else it is set for the given domain and its subdomains. If mAge <= 0, a session cookie is created. If jsAccess is false, the cookie will be in-accesible to Javascript. In most cases you should set it to false(exceptions are rare, like when setting a csrf cookie)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.