Use routing path in v3 matchers
Co-authored-by: Romain <rtribotte@users.noreply.github.com>
This commit is contained in:
parent
de1802d849
commit
859f4e8868
9 changed files with 338 additions and 209 deletions
|
@ -28,7 +28,7 @@ func pathV2(tree *matchersTree, paths ...string) error {
|
|||
var routes []*mux.Route
|
||||
|
||||
for _, path := range paths {
|
||||
route := mux.NewRouter().NewRoute()
|
||||
route := mux.NewRouter().UseRoutingPath().NewRoute()
|
||||
|
||||
if err := route.Path(path).GetError(); err != nil {
|
||||
return err
|
||||
|
@ -54,7 +54,7 @@ func pathPrefixV2(tree *matchersTree, paths ...string) error {
|
|||
var routes []*mux.Route
|
||||
|
||||
for _, path := range paths {
|
||||
route := mux.NewRouter().NewRoute()
|
||||
route := mux.NewRouter().UseRoutingPath().NewRoute()
|
||||
|
||||
if err := route.PathPrefix(path).GetError(); err != nil {
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue