From caf37144950796dd0ff924dff96e69077e15aacc Mon Sep 17 00:00:00 2001 From: JessonChan Date: Sat, 19 Sep 2015 05:41:10 +0800 Subject: [PATCH] revert exceptMethod --- router.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/router.go b/router.go index 4f9d07e0..c0a50988 100644 --- a/router.go +++ b/router.go @@ -63,14 +63,13 @@ var ( "CONNECT": "CONNECT", } // these beego.Controller's methods shouldn't reflect to AutoRouter - exceptMethod = func() []string { - methods := []string{} - rv := reflect.TypeOf(&Controller{}) - for i := 0; i < rv.NumMethod(); i++ { - methods = append(methods, rv.Method(i).Name) - } - return methods - }() + exceptMethod = []string{"Init", "Prepare", "Finish", "Render", "RenderString", + "RenderBytes", "Redirect", "Abort", "StopRun", "UrlFor", "ServeJson", "ServeJsonp", + "ServeXml", "Input", "ParseForm", "GetString", "GetStrings", "GetInt", "GetBool", + "GetFloat", "GetFile", "SaveToFile", "StartSession", "SetSession", "GetSession", + "DelSession", "SessionRegenerateID", "DestroySession", "IsAjax", "GetSecureCookie", + "SetSecureCookie", "XsrfToken", "CheckXsrfCookie", "XsrfFormHtml", + "GetControllerAndAction"} urlPlaceholder = "{{placeholder}}" // DefaultAccessLogFilter will skip the accesslog if return true