mirror of
https://gitee.com/johng/gf
synced 2026-07-05 13:22:16 +08:00
20 lines
254 B
Go
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)
|
|
}
|