1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-26 04:01:29 +00:00

filterfunc name

This commit is contained in:
astaxie 2013-12-15 21:44:58 +08:00
parent d24fbe8426
commit 849dbddc5a

View File

@ -6,6 +6,7 @@ import (
"time" "time"
"github.com/astaxie/beego/toolbox" "github.com/astaxie/beego/toolbox"
"github.com/astaxie/beego/utils"
) )
var BeeAdminApp *AdminApp var BeeAdminApp *AdminApp
@ -132,31 +133,31 @@ func ListConf(rw http.ResponseWriter, r *http.Request) {
fmt.Fprintln(rw, "BeforeRouter:") fmt.Fprintln(rw, "BeforeRouter:")
if bf, ok := BeeApp.Handlers.filters[BeforeRouter]; ok { if bf, ok := BeeApp.Handlers.filters[BeforeRouter]; ok {
for _, f := range bf { for _, f := range bf {
fmt.Fprintln(rw, f.pattern, f.filterFunc) fmt.Fprintln(rw, f.pattern, utils.GetFuncName(f.filterFunc))
} }
} }
fmt.Fprintln(rw, "AfterStatic:") fmt.Fprintln(rw, "AfterStatic:")
if bf, ok := BeeApp.Handlers.filters[AfterStatic]; ok { if bf, ok := BeeApp.Handlers.filters[AfterStatic]; ok {
for _, f := range bf { for _, f := range bf {
fmt.Fprintln(rw, f.pattern, f.filterFunc) fmt.Fprintln(rw, f.pattern, utils.GetFuncName(f.filterFunc))
} }
} }
fmt.Fprintln(rw, "BeforeExec:") fmt.Fprintln(rw, "BeforeExec:")
if bf, ok := BeeApp.Handlers.filters[BeforeExec]; ok { if bf, ok := BeeApp.Handlers.filters[BeforeExec]; ok {
for _, f := range bf { for _, f := range bf {
fmt.Fprintln(rw, f.pattern, f.filterFunc) fmt.Fprintln(rw, f.pattern, utils.GetFuncName(f.filterFunc))
} }
} }
fmt.Fprintln(rw, "AfterExec:") fmt.Fprintln(rw, "AfterExec:")
if bf, ok := BeeApp.Handlers.filters[AfterExec]; ok { if bf, ok := BeeApp.Handlers.filters[AfterExec]; ok {
for _, f := range bf { for _, f := range bf {
fmt.Fprintln(rw, f.pattern, f.filterFunc) fmt.Fprintln(rw, f.pattern, utils.GetFuncName(f.filterFunc))
} }
} }
fmt.Fprintln(rw, "FinishRouter:") fmt.Fprintln(rw, "FinishRouter:")
if bf, ok := BeeApp.Handlers.filters[FinishRouter]; ok { if bf, ok := BeeApp.Handlers.filters[FinishRouter]; ok {
for _, f := range bf { for _, f := range bf {
fmt.Fprintln(rw, f.pattern, f.filterFunc) fmt.Fprintln(rw, f.pattern, utils.GetFuncName(f.filterFunc))
} }
} }
} }