From 70eef5b3e1c20da3e619ae69767a1234392f0dd3 Mon Sep 17 00:00:00 2001 From: Mikhail Mazurskiy Date: Wed, 8 Feb 2017 21:54:40 +1100 Subject: [PATCH] Remove global variables --- staging/src/k8s.io/client-go/examples/out-of-cluster/main.go | 5 +---- .../k8s.io/client-go/examples/third-party-resources/main.go | 4 ---- 2 files changed, 1 insertion(+), 8 deletions(-) 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()