aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/caddyhttp/routes.go
diff options
context:
space:
mode:
authorMohammed Al Sahaf <[email protected]>2020-04-09 00:31:51 +0300
committerGitHub <[email protected]>2020-04-08 15:31:51 -0600
commit7dfd69cdc5966ae454e35cd6e976686131bfda8d (patch)
tree4d58832966c5136d5be3d9b3f63dcb07c30999d1 /modules/caddyhttp/routes.go
parent28fdf64dc510472ccd9e6d46eb149d19cd70919a (diff)
downloadcaddy-7dfd69cdc5966ae454e35cd6e976686131bfda8d.tar.gz
caddy-7dfd69cdc5966ae454e35cd6e976686131bfda8d.zip
chore: make the linter happier (#3245)
* chore: make the linter happier * chore: remove reference to maligned linter in .golangci.yml
Diffstat (limited to 'modules/caddyhttp/routes.go')
-rw-r--r--modules/caddyhttp/routes.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/caddyhttp/routes.go b/modules/caddyhttp/routes.go
index 1224e3297..27d49225b 100644
--- a/modules/caddyhttp/routes.go
+++ b/modules/caddyhttp/routes.go
@@ -167,7 +167,7 @@ func (routes RouteList) ProvisionHandlers(ctx caddy.Context) error {
// This should only be done once: after all the routes have
// been provisioned, and before serving requests.
func (routes RouteList) Compile(next Handler) Handler {
- var mid []Middleware
+ mid := make([]Middleware, 0, len(routes))
for _, route := range routes {
mid = append(mid, wrapRoute(route))
}