~~~
//设置COOKIE
cookie := http.Cookie{Name: "test", Value: "123123", Path: "/", MaxAge: 86400}
http.SetCookie(w, &cookie)
//然后获取COOKIE
cookie, err := r.Cookie("test")
if err != nil {
fmt.Fprintln(w, err)
} else {
fmt.Fprintln(w, cookie.Value)
}
//最终获取的是 http: named cookie not present
// 并没有得到值
//而且2个(设置COOKIE和读取COOKIE)同时使用,测试的时候只能先设置好 在读取 分开
~~~