(w http.ResponseWriter, key string, expires time.Time)
| 159 | ) |
| 160 | |
| 161 | func setSessionCookie(w http.ResponseWriter, key string, expires time.Time) { |
| 162 | cookie := http.Cookie{ |
| 163 | Name: sessionCookieName, |
| 164 | Value: key, |
| 165 | Expires: expires, |
| 166 | Path: sessionCookiePath, |
| 167 | HttpOnly: true, |
| 168 | } |
| 169 | http.SetCookie(w, &cookie) |
| 170 | } |
| 171 | |
| 172 | func unsetSessionCookie(w http.ResponseWriter) { |
| 173 | expires := time.Now().Add(time.Hour * -24 * 30) |
no outgoing calls
no test coverage detected