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/fileserver/caddyfile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/caddyhttp/fileserver/caddyfile.go') diff --git a/modules/caddyhttp/fileserver/caddyfile.go b/modules/caddyhttp/fileserver/caddyfile.go index 2980436..9b458b2 100644 --- a/modules/caddyhttp/fileserver/caddyfile.go +++ b/modules/caddyhttp/fileserver/caddyfile.go @@ -146,7 +146,7 @@ func parseTryFiles(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error) // if there are query strings in the list, we have to split into // a separate route for each item with a query string, because // the rewrite is different for that item - var try []string + try := make([]string, 0, len(tryFiles)) for _, item := range tryFiles { if idx := strings.Index(item, "?"); idx >= 0 { if len(try) > 0 { -- cgit v1.2.3