mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Remove global variables
This commit is contained in:
parent
2be53cf0f8
commit
70eef5b3e1
@ -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)
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user