Created
June 1, 2020 10:41
-
-
Save abohmeed/08992e4462f288b4a09a6c9742914a32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func findKubeConfig() (string, error) { | |
env := os.Getenv("KUBECONFIG") | |
if env != "" { | |
return env, nil | |
} | |
path, err := homedir.Expand("~/.kube/config") | |
if err != nil { | |
return "", err | |
} | |
return path, nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment