mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-07-21 03:28:59 +02:00
fix lint
This commit is contained in:
+2
-1
@@ -257,7 +257,8 @@ func contains(source []string, target string) bool {
|
||||
// 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 {
|
||||
banned, err := isBanned.(string)
|
||||
if ok && err == nil && len(banned) > 0 {
|
||||
return isBanned == cacheNoBannedValue, nil
|
||||
}
|
||||
return false, fmt.Errorf("no data")
|
||||
|
||||
Reference in New Issue
Block a user