Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
Use a single append call instead of a ranged for loop.
  • Loading branch information
muesli committed Jul 20, 2019
1 parent d83b6ff commit 6b549e9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mux.go
Expand Up @@ -112,9 +112,7 @@ func copyRouteConf(r routeConf) routeConf {
}

c.matchers = make([]matcher, 0, len(r.matchers))
for _, m := range r.matchers {
c.matchers = append(c.matchers, m)
}
c.matchers = append(c.matchers, r.matchers...)

return c
}
Expand Down

0 comments on commit 6b549e9

Please sign in to comment.