mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-17 14:12:16 +08:00
Revert "fix the issue:if the router path is /user/:name/*action, you will get the value of action param is /*{action}"
This reverts commit d3be8e5a98fb3e4f71ddd479faafc631bcf99ffe.
This commit is contained in:
parent
d3be8e5a98
commit
9cbb5e3e61
3
tree.go
3
tree.go
@ -280,8 +280,7 @@ func (n *node) insertChild(numParams uint8, path string, fullPath string, handle
|
|||||||
panic("wildcards must be named with a non-empty name in path '" + fullPath + "'")
|
panic("wildcards must be named with a non-empty name in path '" + fullPath + "'")
|
||||||
}
|
}
|
||||||
|
|
||||||
// any wildcard is param
|
if c == ':' { // param
|
||||||
if c == ':' || c == '*' { // param
|
|
||||||
// split path at the beginning of the wildcard
|
// split path at the beginning of the wildcard
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
n.path = path[offset:i]
|
n.path = path[offset:i]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user