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
|
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) {
|
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
|
// Match-any node
|
||||||
MatchAny:
|
MatchAny:
|
||||||
c = cn.findMchild()
|
c = cn.findMchild()
|
||||||
if c != nil {
|
if c != nil {
|
||||||
cn = c
|
cn = c
|
||||||
|
@ -652,8 +652,6 @@ func TestRouterExperiment(t *testing.T) {
|
|||||||
return nil
|
return nil
|
||||||
}, nil)
|
}, nil)
|
||||||
|
|
||||||
r.trees[GET].printTree("", true)
|
|
||||||
|
|
||||||
h, _ := r.Find(GET, "/users/", context)
|
h, _ := r.Find(GET, "/users/", context)
|
||||||
if h == nil {
|
if h == nil {
|
||||||
t.Fatal("handler not found")
|
t.Fatal("handler not found")
|
||||||
|
Loading…
Reference in New Issue
Block a user