make use of short declaration of variables and cleanup code

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal
2022-04-12 22:48:26 +05:30
parent d45bacb34b
commit f30b14f8fd
16 changed files with 66 additions and 61 deletions

View File

@@ -35,9 +35,7 @@ import (
klog "k8s.io/klog/v2"
)
var (
keyFunc = cache.DeletionHandlingMetaNamespaceKeyFunc
)
var keyFunc = cache.DeletionHandlingMetaNamespaceKeyFunc
type secretParamsMap struct {
name string
@@ -267,7 +265,6 @@ func verifyAndGetSecretNameAndNamespaceTemplate(secret secretParamsMap, snapshot
}
// THIS IS NOT A VALID CASE
return "", "", fmt.Errorf("unknown error with getting secret name and namespace templates")
}
// getSecretReference returns a reference to the secret specified in the given nameTemplate