1
0
mirror of https://github.com/labstack/echo.git synced 2025-06-17 00:17:36 +02:00

Moving some logic around

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2015-09-24 15:15:52 -07:00
parent 51a1ef432c
commit c0571e37c3

View File

@ -386,16 +386,13 @@ func (r *Router) Find(method, path string, ctx *Context) (h HandlerFunc, e *Echo
// Match-any node
MatchAny:
// c = cn.getChild()
c = cn.findChildWithType(mtype)
if c != nil {
cn = c
ctx.pvalues[len(cn.pnames)-1] = search
goto Found
}
if cn = cn.findChildWithType(mtype); cn == nil {
// Not found
return
}
ctx.pvalues[len(cn.pnames)-1] = search
goto Found
}
Found:
ctx.pnames = cn.pnames