Dependency updates

This commit is contained in:
Stash Dev
2019-05-27 12:34:26 -07:00
parent 69917999ef
commit 4b037e1040
359 changed files with 60172 additions and 18749 deletions

View File

@@ -651,9 +651,6 @@ func patNextSegment(pattern string) (nodeTyp, string, string, byte, int, int) {
}
// Sanity check
if ws >= 0 && ws != len(pattern)-1 {
panic("chi: wildcard '*' must be the last value in a route. trim trailing text or use a '{param}' instead")
}
if ps >= 0 && ws >= 0 && ws < ps {
panic("chi: wildcard '*' must be the last pattern in a route, otherwise use a '{param}'")
}
@@ -709,7 +706,9 @@ func patNextSegment(pattern string) (nodeTyp, string, string, byte, int, int) {
}
// Wildcard pattern as finale
// TODO: should we panic if there is stuff after the * ???
if ws < len(pattern)-1 {
panic("chi: wildcard '*' must be the last value in a route. trim trailing text or use a '{param}' instead")
}
return ntCatchAll, "*", "", 0, ws, len(pattern)
}