Merge commit '1fcc594b2aa76d6be1e6a212fb59d897d6082c6c' into ja

This commit is contained in:
Shin Kojima
2014-12-17 02:05:13 +09:00

View File

@@ -60,8 +60,7 @@ Go uses the `SetCookie` function in the `net/http` package to set cookies:
Here is an example of setting a cookie:
expiration := *time.LocalTime()
expiration.Year += 1
expiration := time.Now().Add(365 * 24 * time.Hour)
cookie := http.Cookie{Name: "username", Value: "astaxie", Expires: expiration}
http.SetCookie(w, &cookie)