Skip to content

Commit

Permalink
bugfix group
Browse files Browse the repository at this point in the history
  • Loading branch information
nissy committed Apr 3, 2018
1 parent c5de16b commit 9627747
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions group.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ type Group struct {
}

func (g *Group) Group(pattern string, middlewares ...Middleware) *Group {
g.prefix += compensatePattern(pattern)
g.middlewares = append(g.middlewares, middlewares...)
return g
return &Group{
mux: g.mux,
middlewares: append(g.middlewares, middlewares...),
prefix: g.prefix + compensatePattern(pattern),
}
}

func (g *Group) Use(middlewares ...Middleware) {
Expand Down

0 comments on commit 9627747

Please sign in to comment.