From 56032c67af2c343a04904d0bcc5f0bcc7c9d7422 Mon Sep 17 00:00:00 2001 From: JessonChan Date: Fri, 18 Sep 2015 18:31:06 +0800 Subject: [PATCH] runFunction camel name --- router.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/router.go b/router.go index 57addd4e..d2f9a4b5 100644 --- a/router.go +++ b/router.go @@ -109,7 +109,7 @@ type controllerInfo struct { controllerType reflect.Type methods map[string]string handler http.Handler - runfunction FilterFunc + runFunction FilterFunc routerType int } @@ -325,7 +325,7 @@ func (p *ControllerRegister) AddMethod(method, pattern string, f FilterFunc) { route := &controllerInfo{} route.pattern = pattern route.routerType = routerTypeRESTFul - route.runfunction = f + route.runFunction = f methods := make(map[string]string) if method == "*" { for _, val := range HTTPMETHOD { @@ -726,7 +726,7 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request) if routerInfo.routerType == routerTypeRESTFul { if _, ok := routerInfo.methods[r.Method]; ok { isRunable = true - routerInfo.runfunction(context) + routerInfo.runFunction(context) } else { exception("405", context) goto Admin