chore: make the linter happier (#3245)

* chore: make the linter happier

* chore: remove reference to maligned linter in .golangci.yml
This commit is contained in:
Mohammed Al Sahaf
2020-04-09 00:31:51 +03:00
committed by GitHub
parent 28fdf64dc5
commit 7dfd69cdc5
19 changed files with 28 additions and 26 deletions

View File

@ -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