381 Star 2.5K Fork 616

GVPJohn / gf

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
session.go 381 Bytes
一键复制 编辑 原始数据 按行查看 历史
John 提交于 2018-11-16 18:20 . 性能改进中
package main
import (
"gitee.com/johng/gf/g"
"gitee.com/johng/gf/g/net/ghttp"
"gitee.com/johng/gf/g/util/gconv"
)
func main() {
s := g.Server()
s.BindHandler("/session", func(r *ghttp.Request) {
id := r.Session.GetInt("id")
r.Session.Set("id", id + 1)
r.Response.Write("id:" + gconv.String(id))
})
s.SetPort(8199)
s.Run()
}
Go
1
https://gitee.com/johng/gf.git
git@gitee.com:johng/gf.git
johng
gf
gf
v1.4.7

搜索帮助

53164aa7 5694891 3bd8fe86 5694891