Beispiel #1
0
// 测试freeSession之后,值是否被清空
func freeSession2(a *assert.Assertion, inst *sess.Instance, w http.ResponseWriter, r *http.Request) {
	sess, err := inst.StartSession(w, r)
	a.NotError(err)
	a.NotNil(sess)

	uid, found := sess.Get("uid")
	a.False(found)
	a.Equal(uid, nil)
}