You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Check if the flag already exists to avoid duplicate definition
38
-
iff:=flags.Lookup("kubeconfig"); f!=nil {
39
-
loadingRules.ExplicitPath=f.Value.String()
40
-
} else {
41
-
flags.StringVar(&loadingRules.ExplicitPath, "kubeconfig", loadingRules.ExplicitPath, "Path to the kubeconfig file to use")
42
-
}
43
-
iff:=flags.Lookup("context"); f!=nil {
44
-
overrides.CurrentContext=f.Value.String()
45
-
} else {
46
-
flags.StringVar(&overrides.CurrentContext, "context", overrides.CurrentContext, "The name of the kubeconfig context to use")
47
-
}
48
-
iff:=flags.Lookup("user"); f!=nil {
49
-
overrides.Context.AuthInfo=f.Value.String()
50
-
} else {
51
-
flags.StringVar(&overrides.Context.AuthInfo, "user", overrides.Context.AuthInfo, "The name of the kubeconfig user to use")
52
-
}
53
-
iff:=flags.Lookup("cluster"); f!=nil {
54
-
overrides.Context.Cluster=f.Value.String()
55
-
} else {
56
-
flags.StringVar(&overrides.Context.Cluster, "cluster", overrides.Context.Cluster, "The name of the kubeconfig cluster to use")
57
-
}
58
-
iff:=flags.Lookup("namespace"); f!=nil {
59
-
overrides.Context.Namespace=f.Value.String()
60
-
} else {
61
-
flags.StringVarP(&overrides.Context.Namespace, "namespace", "n", overrides.Context.Namespace, "The name of the Kubernetes Namespace to work in (NOT optional)")
62
-
}
37
+
flags.StringVar(&loadingRules.ExplicitPath, "kubeconfig", loadingRules.ExplicitPath, "Path to the kubeconfig file to use")
38
+
flags.StringVar(&overrides.CurrentContext, "context", overrides.CurrentContext, "The name of the kubeconfig context to use")
39
+
flags.StringVar(&overrides.Context.AuthInfo, "user", overrides.Context.AuthInfo, "The name of the kubeconfig user to use")
40
+
flags.StringVar(&overrides.Context.Cluster, "cluster", overrides.Context.Cluster, "The name of the kubeconfig cluster to use")
41
+
flags.StringVarP(&overrides.Context.Namespace, "namespace", "n", overrides.Context.Namespace, "The name of the Kubernetes Namespace to work in (NOT optional)")
0 commit comments