diff --git a/.golangci.yaml b/.golangci.yaml index 71c6cf89c82..4d0187a6411 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -94,6 +94,7 @@ linters: # - gosimple # - govet # - ineffassign + - loggercheck # - misspell - nakedret # - nilerr diff --git a/controllers/registry.go b/controllers/registry.go index 1f5d98c0d31..3234cd53a13 100644 --- a/controllers/registry.go +++ b/controllers/registry.go @@ -472,8 +472,8 @@ func (r *DPAReconciler) getMatchedKeyValue(key string, s string) (string, error) s = strings.TrimPrefix(s, prefix) } if len(s) == 0 { - r.Log.Info("Could not parse secret for %s", key) - return s, errors.New(key + " secret parsing error") + r.Log.Info(fmt.Sprintf("Could not parse secret for %s", key)) + return s, errors.New("secret parsing error in key " + key) } return s, nil }