Documentation ¶
Overview ¶
Package cookieutil implements functions for working with http cookie.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteCookie ¶
DeleteCookie deletes cookie for specified key. Cookie key should be presented as string. Returns error if cookie not found.
func GetCookieValue ¶
GetCookieValue returns cookie value for specified key. Cookie value is presented as string. Returns error if cookie not found.
func SaveCookie ¶
func SaveCookie(rw http.ResponseWriter, key string, value string)
SaveCookie saves cookie with specified key and value. Key and value should presented as strings.
func SetExpiration ¶
SetExpiration sets cookie duration expiration for SaveCookie func. If time.ParseDuration occurs any error, this will be returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.