diff --git a/staging/src/k8s.io/client-go/examples/out-of-cluster/main.go b/staging/src/k8s.io/client-go/examples/out-of-cluster/main.go index a8a4fb50a61..33bb6a5e1cd 100644 --- a/staging/src/k8s.io/client-go/examples/out-of-cluster/main.go +++ b/staging/src/k8s.io/client-go/examples/out-of-cluster/main.go @@ -26,11 +26,8 @@ import ( "k8s.io/client-go/tools/clientcmd" ) -var ( - kubeconfig = flag.String("kubeconfig", "./config", "absolute path to the kubeconfig file") -) - func main() { + kubeconfig := flag.String("kubeconfig", "./config", "absolute path to the kubeconfig file") flag.Parse() // uses the current context in kubeconfig config, err := clientcmd.BuildConfigFromFlags("", *kubeconfig) diff --git a/staging/src/k8s.io/client-go/examples/third-party-resources/main.go b/staging/src/k8s.io/client-go/examples/third-party-resources/main.go index 5218a80a9b9..0cd9c8f1955 100644 --- a/staging/src/k8s.io/client-go/examples/third-party-resources/main.go +++ b/staging/src/k8s.io/client-go/examples/third-party-resources/main.go @@ -35,10 +35,6 @@ import ( _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" ) -var ( - config *rest.Config -) - func main() { kubeconfig := flag.String("kubeconfig", "", "Path to a kube config. Only required if out-of-cluster.") flag.Parse()