From feb40d9b5ff6317956b41f74a8d5edf1f9261fb3 Mon Sep 17 00:00:00 2001 From: Max Lerebourg Date: Thu, 29 Sep 2022 10:08:07 +0200 Subject: [PATCH] fix lint --- bouncer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bouncer.go b/bouncer.go index 92245af..d93caf9 100644 --- a/bouncer.go +++ b/bouncer.go @@ -192,7 +192,8 @@ func (a *Bouncer) ServeHTTP(rw http.ResponseWriter, req *http.Request) { RawQuery: fmt.Sprintf("ip=%v&banned=true", remoteHost), } body := crowdsecQuery(a, routeURL.String()) - if !bytes.Equal(body, []byte("null")) { + nullByte := []byte("null") + if !bytes.Equal(body, nullByte) { var decisions []Decision err := json.Unmarshal(body, &decisions) if err != nil {