mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
fixed broken build
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
9f41bbedec
commit
eca5d87221
@ -209,10 +209,7 @@ func (r *router) Find(method, path string, params Params) (h HandlerFunc, echo *
|
||||
search = "" // End search
|
||||
continue
|
||||
}
|
||||
if tn != nil {
|
||||
|
||||
}
|
||||
println(tn.handler, tn.prefix)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -344,6 +344,18 @@ func TestRouterMicroParam(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRouterConflict(t *testing.T) {
|
||||
r := New().Router
|
||||
r.Add(GET, "/users", func(*Context) {}, nil)
|
||||
r.Add(GET, "/users/new", func(*Context) {}, nil)
|
||||
r.Add(GET, "/users/old", func(*Context) {}, nil)
|
||||
r.Add(GET, "/users/:id", func(*Context) {}, nil)
|
||||
h, _ := r.Find(GET, "/users/nnn", params)
|
||||
println(h)
|
||||
n := r.trees[GET]
|
||||
n.printTree("", true)
|
||||
}
|
||||
|
||||
func TestRouterAPI(t *testing.T) {
|
||||
r := New().Router
|
||||
for _, route := range api {
|
||||
|
Loading…
Reference in New Issue
Block a user