12 lines
226 B
Go
12 lines
226 B
Go
package site
|
|
|
|
import "net/http"
|
|
|
|
func deleteCookieInResponse(w http.ResponseWriter, name string) {
|
|
w.Header().Set("Set-Cookie", (&http.Cookie{
|
|
Name: name,
|
|
Path: "/",
|
|
MaxAge: -1, // expire the cookie
|
|
}).String())
|
|
}
|