aa68ffec by astaxie

beego: support not-empty value in router fix #555

1 parent 78991c81
...@@ -109,6 +109,10 @@ func (p *ControllerRegistor) Add(pattern string, c ControllerInterface, mappingM ...@@ -109,6 +109,10 @@ func (p *ControllerRegistor) Add(pattern string, c ControllerInterface, mappingM
109 expr = `([\w]+)` 109 expr = `([\w]+)`
110 part = part[:lindex] 110 part = part[:lindex]
111 } 111 }
112 //marth /user/:id! non-empty value
113 } else if part[len(part)-1] == '!' {
114 expr = `(.+)`
115 part = part[:len(part)-1]
112 } 116 }
113 params[j] = part 117 params[j] = part
114 parts[i] = expr 118 parts[i] = expr
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!