From 7dfd69cdc5966ae454e35cd6e976686131bfda8d Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Thu, 9 Apr 2020 00:31:51 +0300 Subject: chore: make the linter happier (#3245) * chore: make the linter happier * chore: remove reference to maligned linter in .golangci.yml --- modules/caddyhttp/routes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/caddyhttp/routes.go') diff --git a/modules/caddyhttp/routes.go b/modules/caddyhttp/routes.go index 1224e32..27d4922 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)) } -- cgit v1.2.3