ghttp.Request.Exit示例代码更新

This commit is contained in:
john
2018-11-06 19:02:11 +08:00
parent 61bc9dbd92
commit 871b7b87d0

View File

@ -15,10 +15,10 @@ func main() {
r.Response.Writeln("end")
})
s.BindHookHandlerByMap(p, map[string]ghttp.HandlerFunc{
"BeforeServe" : func(r *ghttp.Request){
ghttp.HOOK_BEFORE_SERVE : func(r *ghttp.Request){
glog.To(r.Response.Writer).Println("BeforeServe")
},
"AfterServe" : func(r *ghttp.Request){
ghttp.HOOK_AFTER_SERVE : func(r *ghttp.Request){
glog.To(r.Response.Writer).Println("AfterServe")
},
})