1
0
mirror of https://github.com/labstack/echo.git synced 2025-04-25 12:24:55 +02:00

Merge branch 'master' of https://github.com/meehow/echo into meehow-master

This commit is contained in:
Vishal Rana 2019-07-17 18:31:55 -07:00
commit ae55310e59
2 changed files with 9 additions and 0 deletions

@ -218,6 +218,9 @@ func (n *node) findChildWithLabel(l byte) *node {
}
func (n *node) findChildByKind(t kind) *node {
if n == nil {
return nil
}
for _, c := range n.children {
if c.kind == t {
return c

@ -756,6 +756,12 @@ func TestRouterPriorityNotFound(t *testing.T) {
c.Set("b", 2)
return nil
})
r.Add(http.MethodGet, "/:lang/", func(c Context) error {
return nil
})
r.Add(http.MethodGet, "/:lang/dupa", func(c Context) error {
return nil
})
// Find
r.Find(http.MethodGet, "/a/foo", c)