1
0
mirror of https://github.com/labstack/echo.git synced 2025-07-15 01:34:53 +02:00

updated migration guide

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-11-13 09:36:57 -08:00
parent 2f70d3e1c7
commit c5a3575d4c
17 changed files with 147 additions and 237 deletions

View File

@ -1,5 +1,7 @@
package echo
import "strings"
type (
// Router is the registry of all registered routes for an `Echo` instance for
// request matching and URL path parameter parsing.
@ -170,7 +172,12 @@ func (r *Router) insert(method, path string, h HandlerFunc, t kind, ppath string
if h != nil {
cn.addHandler(method, h)
cn.ppath = ppath
cn.pnames = pnames
for i, n := range cn.pnames {
// Param name aliases
if !strings.Contains(n, pnames[i]) {
cn.pnames[i] += "," + pnames[i]
}
}
}
}
return