From 0aff6e17895910a15088be99c4e5d8d5947fc59d Mon Sep 17 00:00:00 2001 From: Max Lerebourg Date: Thu, 29 Sep 2022 09:15:14 +0200 Subject: [PATCH] fix lint --- bouncer.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bouncer.go b/bouncer.go index 72697f5..5d08951 100644 --- a/bouncer.go +++ b/bouncer.go @@ -242,7 +242,7 @@ func (a *Bouncer) ServeHTTP(rw http.ResponseWriter, req *http.Request) { // CUSTOM CODE // TODO place in another file -// Decision: Body returned from Crowdsec LAPI +// Decision: Body returned from Crowdsec LAPI. type Decision struct { Id int `json:"id"` Origin string `json:"origin"` @@ -254,7 +254,7 @@ type Decision struct { Simulated bool `json:"simulated"` } -// Stream: Body returned from Crowdsec Stream LAPI +// Stream: Body returned from Crowdsec Stream LAPI. type Stream struct { Deleted []Decision `json:"deleted"` New []Decision `json:"new"` @@ -269,8 +269,8 @@ func contains(source []string, target string) bool { return false } -// Get Decision check in the cache if the IP has the banned / not banned value -// Otherwise return with an error to add the IP in cache if we are on +// Get Decision check in the cache if the IP has the banned / not banned value. +// Otherwise return with an error to add the IP in cache if we are on. func getDecision(clientIP string) (bool, error) { isBanned, ok := cache.Get(clientIP) if ok && len(isBanned.(string)) > 0 {