[ja] apply patch]
This commit is contained in:
@@ -60,8 +60,8 @@ wは入力する必要のあるresponse、cookieはstructです。cookieオブ
|
||||
|
||||
例を一つ見てみましょう。どのようにcookieを設定するかです。
|
||||
|
||||
expiration := *time.LocalTime()
|
||||
expiration.Year += 1
|
||||
expiration := time.Now()
|
||||
expiration = expiration.AddDate(1, 0, 0)
|
||||
cookie := http.Cookie{Name: "username", Value: "astaxie", Expires: expiration}
|
||||
http.SetCookie(w, &cookie)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user