mirror of
https://github.com/labstack/echo.git
synced 2024-11-28 08:38:39 +02:00
parent
ace1453931
commit
54d2f72368
@ -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
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user