Settings variable, function names, and comments inconsistently use either Kubeconfig, KubeconfigPath or KubeConfigPath capitalizations. This is a minor refactor to consistently use the KubeConfig capitalization variants. Relates-To: #124 Change-Id: Iaece6683931164ccaa213f4f3385de9c077d26b7 Signed-off-by: Alexander Hughes <Alexander.Hughes@pm.me>
13 lines
271 B
Go
13 lines
271 B
Go
package utils
|
|
|
|
import (
|
|
"k8s.io/cli-runtime/pkg/genericclioptions"
|
|
cmdutil "k8s.io/kubectl/pkg/cmd/util"
|
|
)
|
|
|
|
func FactoryFromKubeConfigPath(kp string) cmdutil.Factory {
|
|
kf := genericclioptions.NewConfigFlags(false)
|
|
kf.KubeConfig = &kp
|
|
return cmdutil.NewFactory(kf)
|
|
}
|