1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-13 16:11:01 +00:00

add api comments in file config.go, controller.go, filter.go and flash.go

This commit is contained in:
傅小黑
2013-12-20 21:16:26 +08:00
parent 933e98e4f2
commit b459cf2347
4 changed files with 126 additions and 31 deletions

View File

@ -5,6 +5,8 @@ import (
"strings"
)
// FilterRouter defines filter operation before controller handler execution.
// it can match patterned url and do filter function when action arrives.
type FilterRouter struct {
pattern string
regex *regexp.Regexp
@ -14,6 +16,8 @@ type FilterRouter struct {
parseParams map[string]string
}
// ValidRouter check current request is valid for this filter.
// if matched, returns parsed params in this request by defined filter router pattern.
func (mr *FilterRouter) ValidRouter(router string) (bool, map[string]string) {
if mr.pattern == "" {
return true, nil