1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-10 02:30:18 +00:00

Accept parameters more types

This commit is contained in:
miraclesu
2013-07-28 16:59:35 +08:00
parent ae7e31717a
commit dcdfaf36f1
3 changed files with 32 additions and 30 deletions

View File

@ -264,8 +264,7 @@ type Match struct {
}
func (m Match) IsSatisfied(obj interface{}) bool {
str := obj.(string)
return m.Regexp.MatchString(str)
return m.Regexp.MatchString(fmt.Sprintf("%v", obj))
}
func (m Match) DefaultMessage() string {