1
0
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:
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 // 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