1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-16 02:32:17 +00:00

beego:fix the :id & * mixed router

This commit is contained in:
astaxie
2014-06-30 23:49:11 +08:00
parent 4dde2c59ff
commit 53353fce56
2 changed files with 7 additions and 0 deletions

View File

@@ -159,6 +159,10 @@ func (t *Tree) addseg(segments []string, route interface{}, wildcards []string,
iswild = true
regexpStr = seg
}
if seg == "*" && len(wildcards) > 0 && reg == "" {
iswild = true
regexpStr = "(.+)"
}
if iswild {
if t.wildcard == nil {
t.wildcard = NewTree()