mirror of
https://gitee.com/johng/gf
synced 2026-07-04 21:03:13 +08:00
example&comment update
This commit is contained in:
@ -16,10 +16,10 @@ func main() {
|
||||
})
|
||||
s.BindHookHandlerByMap(p, map[string]ghttp.HandlerFunc{
|
||||
ghttp.HookBeforeServe: func(r *ghttp.Request) {
|
||||
glog.To(r.Response.Writer).Print("BeforeServe")
|
||||
glog.To(r.Response.Writer).Print(r.Context(), "BeforeServe")
|
||||
},
|
||||
ghttp.HookAfterServe: func(r *ghttp.Request) {
|
||||
glog.To(r.Response.Writer).Print("AfterServe")
|
||||
glog.To(r.Response.Writer).Print(r.Context(), "AfterServe")
|
||||
},
|
||||
})
|
||||
s.SetPort(8199)
|
||||
|
||||
Reference in New Issue
Block a user