From b37f866ca9e6f852aab3bfe8129f929116da35e3 Mon Sep 17 00:00:00 2001 From: Max Lerebourg Date: Sun, 20 Nov 2022 12:33:39 +0100 Subject: [PATCH] :bento: fix lint :vomit: --- bouncer.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bouncer.go b/bouncer.go index 6c179d3..5b0f01a 100644 --- a/bouncer.go +++ b/bouncer.go @@ -173,10 +173,10 @@ func (bouncer *Bouncer) ServeHTTP(rw http.ResponseWriter, req *http.Request) { // TODO This should be simplified if bouncer.crowdsecMode != noneMode { - isBanned, err := cache.GetDecision(remoteIP) - if err != nil { - logger.Debug(fmt.Sprintf("ServeHTTP:getDecision ip:%s %s", remoteIP, err.Error())) - if err.Error() == simpleredis.RedisUnreachable { + isBanned, erro := cache.GetDecision(remoteIP) + if erro != nil { + logger.Debug(fmt.Sprintf("ServeHTTP:getDecision ip:%s %s", remoteIP, erro.Error())) + if erro.Error() == simpleredis.RedisUnreachable { rw.WriteHeader(http.StatusForbidden) return }