chore: update linter

This commit is contained in:
Ludovic Fernandez 2024-02-19 15:44:03 +01:00 committed by GitHub
parent 1034646ae2
commit 88a2020817
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 139 additions and 218 deletions

View file

@ -6,6 +6,7 @@ import (
"os"
"path/filepath"
"runtime"
"slices"
"time"
"github.com/traefik/traefik/v2/pkg/log"
@ -452,12 +453,8 @@ func (c *clientWrapper) isWatchedNamespace(ns string) bool {
if c.isNamespaceAll {
return true
}
for _, watchedNamespace := range c.watchedNamespaces {
if watchedNamespace == ns {
return true
}
}
return false
return slices.Contains(c.watchedNamespaces, ns)
}
// translateNotFoundError will translate a "not found" error to a boolean return