123456789101112131415 |
- package myth
- import "net/http"
- // SetCookie set http cookie
- func SetCookie(w http.ResponseWriter, name, value, path string, maxAge int) {
- cookie := &http.Cookie{
- Name: name,
- Value: value,
- Path: path,
- HttpOnly: false,
- MaxAge: maxAge}
- http.SetCookie(w, cookie)
- }
|