重新调整w,r的入口

This commit is contained in:
eson
2023-07-24 13:17:02 +08:00
parent 4c2f823178
commit 7ec78d1c35
82 changed files with 89 additions and 88 deletions

View File

@@ -27,11 +27,11 @@ func BeforeLogic(w http.ResponseWriter, r *http.Request, l reflect.Value) (isNex
return true
}
func AfterLogic(w http.ResponseWriter, r *http.Request, l reflect.Value) bool {
func AfterLogic(w http.ResponseWriter, r *http.Request, l reflect.Value, resp *Response) bool {
m := l.MethodByName("AfterLogic")
if m.IsValid() {
m.Call([]reflect.Value{reflect.ValueOf(w), reflect.ValueOf(r)})
m.Call([]reflect.Value{reflect.ValueOf(w), reflect.ValueOf(r), reflect.ValueOf(resp)})
return true
}
return false