mirror of
https://github.com/labstack/echo.git
synced 2024-11-28 08:38:39 +02:00
Moving some logic around
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
51a1ef432c
commit
c0571e37c3
11
router.go
11
router.go
@ -386,16 +386,13 @@ func (r *Router) Find(method, path string, ctx *Context) (h HandlerFunc, e *Echo
|
|||||||
// Match-any node
|
// Match-any node
|
||||||
MatchAny:
|
MatchAny:
|
||||||
// c = cn.getChild()
|
// c = cn.getChild()
|
||||||
c = cn.findChildWithType(mtype)
|
if cn = cn.findChildWithType(mtype); cn == nil {
|
||||||
if c != nil {
|
|
||||||
cn = c
|
|
||||||
ctx.pvalues[len(cn.pnames)-1] = search
|
|
||||||
goto Found
|
|
||||||
}
|
|
||||||
|
|
||||||
// Not found
|
// Not found
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
ctx.pvalues[len(cn.pnames)-1] = search
|
||||||
|
goto Found
|
||||||
|
}
|
||||||
|
|
||||||
Found:
|
Found:
|
||||||
ctx.pnames = cn.pnames
|
ctx.pnames = cn.pnames
|
||||||
|
Loading…
Reference in New Issue
Block a user