mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Dependency updates
This commit is contained in:
7
vendor/github.com/go-chi/chi/tree.go
generated
vendored
7
vendor/github.com/go-chi/chi/tree.go
generated
vendored
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user