mirror of
https://github.com/labstack/echo.git
synced 2025-07-15 01:34:53 +02:00
small change to allow nested groups
This commit is contained in:
2
echo.go
2
echo.go
@ -147,7 +147,7 @@ func New() (e *Echo) {
|
|||||||
// the parent. Passing middleware overrides parent middleware.
|
// the parent. Passing middleware overrides parent middleware.
|
||||||
func (e *Echo) Group(pfx string, m ...Middleware) *Echo {
|
func (e *Echo) Group(pfx string, m ...Middleware) *Echo {
|
||||||
g := *e
|
g := *e
|
||||||
g.prefix = pfx
|
g.prefix = g.prefix + pfx
|
||||||
if len(m) > 0 {
|
if len(m) > 0 {
|
||||||
g.middleware = nil
|
g.middleware = nil
|
||||||
g.Use(m...)
|
g.Use(m...)
|
||||||
|
Reference in New Issue
Block a user