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/replacer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/caddyhttp/replacer.go') diff --git a/modules/caddyhttp/replacer.go b/modules/caddyhttp/replacer.go index 51fe67f..b83977c 100644 --- a/modules/caddyhttp/replacer.go +++ b/modules/caddyhttp/replacer.go @@ -188,7 +188,7 @@ func addHTTPVarsToReplacer(repl *caddy.Replacer, req *http.Request, w http.Respo if strings.HasPrefix(key, varsReplPrefix) { varName := key[len(varsReplPrefix):] tbl := req.Context().Value(VarsCtxKey).(map[string]interface{}) - raw, _ := tbl[varName] + raw := tbl[varName] // variables can be dynamic, so always return true // even when it may not be set; treat as empty then return raw, true -- cgit v1.2.3