1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 13:40:55 +00:00

revert exceptMethod

This commit is contained in:
JessonChan 2015-09-19 05:41:10 +08:00
parent 983bac986a
commit caf3714495

View File

@ -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