1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

small change to allow nested groups

This commit is contained in:
Tim Anema 2015-04-26 18:17:46 -04:00
parent 67b1dfea04
commit e11de1df62

View File

@ -147,7 +147,7 @@ func New() (e *Echo) {
// the parent. Passing middleware overrides parent middleware.
func (e *Echo) Group(pfx string, m ...Middleware) *Echo {
g := *e
g.prefix = pfx
g.prefix = g.prefix + pfx
if len(m) > 0 {
g.middleware = nil
g.Use(m...)