-
Notifications
You must be signed in to change notification settings - Fork 28
session
silsuer edited this page Aug 20, 2018
·
1 revision
Bingo使用 gorilla/sessions 管理session,具体用法如下:
func Index(c *bingo.Context) {
// 设置一个session
c.Session.Set("name","silsuer")
// 读取一个session
fmt.Fprintln(c.Writer,c.Session.Get("name"))
}我喜欢旅行,但不喜欢到达目的地 ——Einstein