title: Can't get cookie expiration time in golang
body: <p>I'm setting a new cookie</p>
  
  <pre><code>func f1(w http.ResponseWriter, r *http.Request) {
  ...
  expire := time.Now().AddDate(0, 1, 0)
  cookie := http.Cookie{"token", token, "/", "domain", expire, expire.Format(time.UnixDate), 86400, true, true, "token=" + token, []string{"token=" + token}}
  http.SetCookie(w, &amp;cookie)
  </code></pre>
  
  <p>Then i'm trying to get it</p>
  
  <pre><code>func f2(w http.ResponseWriter, r *http.Request) {
  ...
  cookie, err := r.Cookie("token")
  fmt.Println(cookie.Value)
  fmt.Println(cookie.Expires)
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>valid_token_string
  0001-01-01 00:00:00 +0000 UTC
  </code></pre>
  
  <p>Value is the same i set, but Expires is empty.
  Why?</p>