lint (errorlint) (#2644)

This commit is contained in:
mmetc 2023-12-18 09:35:28 +01:00 committed by GitHub
parent c2c173ac7e
commit 08694adf1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 27 additions and 33 deletions

3
pkg/cache/cache.go vendored
View file

@ -1,6 +1,7 @@
package cache
import (
"errors"
"time"
"github.com/bluele/gcache"
@ -104,7 +105,7 @@ func GetKey(cacheName string, key string) (string, error) {
if name == cacheName {
if value, err := Caches[i].Get(key); err != nil {
//do not warn or log if key not found
if err == gcache.KeyNotFoundError {
if errors.Is(err, gcache.KeyNotFoundError) {
return "", nil
}
CacheConfig[i].Logger.Warningf("While getting key %s in cache %s: %s", key, cacheName, err)