diff --git a/router.go b/router.go index 71249db9..dca7935c 100644 --- a/router.go +++ b/router.go @@ -68,7 +68,7 @@ func (r *router) Add(method, path string, h HandlerFunc, echo *Echo) { return } } - r.insert(method, path, h, stype, nil, echo) + r.insert(method, path, h, stype, pnames, echo) } func (r *router) insert(method, path string, h HandlerFunc, t ntype, pnames []string, echo *Echo) { @@ -260,7 +260,7 @@ func (r *router) Find(method, path string, ctx *Context) (h HandlerFunc, echo *E } // Match-any node - MatchAny: + MatchAny: c = cn.findMchild() if c != nil { cn = c diff --git a/router_test.go b/router_test.go index 2bc8d8eb..ffb28521 100644 --- a/router_test.go +++ b/router_test.go @@ -652,8 +652,6 @@ func TestRouterExperiment(t *testing.T) { return nil }, nil) - r.trees[GET].printTree("", true) - h, _ := r.Find(GET, "/users/", context) if h == nil { t.Fatal("handler not found")