Revert "Upgrade to golangci-lint v1.32.2"

This commit is contained in:
Sargun Dhillon
2020-11-06 17:08:38 -08:00
committed by GitHub
parent ba79256b1d
commit b4e62a645b
2 changed files with 4 additions and 7 deletions

View File

@@ -24,16 +24,13 @@ func ClientsetFromEnv(kubeConfigPath string) (*kubernetes.Clientset, error) {
)
if kubeConfigPath != "" {
_, err = os.Stat(kubeConfigPath)
if err == nil {
if _, err := os.Stat(kubeConfigPath); err != nil {
config, err = rest.InClusterConfig()
} else {
config, err = clientcmd.NewNonInteractiveDeferredLoadingClientConfig(
&clientcmd.ClientConfigLoadingRules{ExplicitPath: kubeConfigPath},
&clientcmd.ConfigOverrides{},
).ClientConfig()
} else if os.IsNotExist(err) {
config, err = rest.InClusterConfig()
} else {
return nil, err
}
} else {
config, err = rest.InClusterConfig()