Files
gf/geg/frame/mvc/controller/stats/stats.go
2019-04-03 00:03:46 +08:00

20 lines
254 B
Go

package stats
import (
"github.com/gogf/gf/g"
"github.com/gogf/gf/g/net/ghttp"
)
var (
total int
)
func init() {
g.Server().BindHandler("/stats/total", showTotal)
}
func showTotal(r *ghttp.Request) {
total++
r.Response.Write("total:", total)
}