This commit is contained in:
astaxie 2013-10-12 16:56:30 +08:00
parent 5d55ca19be
commit e11c40eee4
1 changed files with 4 additions and 2 deletions

View File

@ -26,8 +26,10 @@ func (mr *FilterRouter) ValidRouter(router string) bool {
return true
}
matches := mr.regex.FindStringSubmatch(router)
if len(matches[0]) == len(router) {
return true
if len(matches) > 0 {
if len(matches[0]) == len(router) {
return true
}
}
}
return false