summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/fileserver
diff options
context:
space:
mode:
authorMohammed Al Sahaf <msaa1990@gmail.com>2020-04-09 00:31:51 +0300
committerGitHub <noreply@github.com>2020-04-08 15:31:51 -0600
commit7dfd69cdc5966ae454e35cd6e976686131bfda8d (patch)
tree4d58832966c5136d5be3d9b3f63dcb07c30999d1 /modules/caddyhttp/fileserver
parent28fdf64dc510472ccd9e6d46eb149d19cd70919a (diff)
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/fileserver')
-rw-r--r--modules/caddyhttp/fileserver/caddyfile.go2
1 files changed, 1 insertions, 1 deletions
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 {