Update staging/src/k8s.io/kubectl/pkg/cmd/config/config.go
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com> Kubernetes-commit: 9d03185d3c12a0b3f2f36a5096d4a9658bba5472
This commit is contained in:
parent
af40736fcc
commit
b817d296dd
|
|
@ -110,7 +110,7 @@ func helpErrorf(cmd *cobra.Command, format string, args ...interface{}) error {
|
||||||
|
|
||||||
// The completion function need the factory, so we initialize them once it is available
|
// The completion function need the factory, so we initialize them once it is available
|
||||||
func initCompletionFunctions(f cmdutil.Factory) {
|
func initCompletionFunctions(f cmdutil.Factory) {
|
||||||
CompListContextsInConfig = func(notused cmdutil.Factory, toComplete string) []string {
|
CompListContextsInConfig = func(_ cmdutil.Factory, toComplete string) []string {
|
||||||
config, err := f.ToRawKubeConfigLoader().RawConfig()
|
config, err := f.ToRawKubeConfigLoader().RawConfig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return nil
|
||||||
|
|
@ -124,7 +124,7 @@ func initCompletionFunctions(f cmdutil.Factory) {
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
CompListClustersInConfig = func(notused cmdutil.Factory, toComplete string) []string {
|
CompListClustersInConfig = func(_ cmdutil.Factory, toComplete string) []string {
|
||||||
config, err := f.ToRawKubeConfigLoader().RawConfig()
|
config, err := f.ToRawKubeConfigLoader().RawConfig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return nil
|
||||||
|
|
@ -138,7 +138,7 @@ func initCompletionFunctions(f cmdutil.Factory) {
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
CompListUsersInConfig = func(notused cmdutil.Factory, toComplete string) []string {
|
CompListUsersInConfig = func(_ cmdutil.Factory, toComplete string) []string {
|
||||||
config, err := f.ToRawKubeConfigLoader().RawConfig()
|
config, err := f.ToRawKubeConfigLoader().RawConfig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue