client-gok8s.io/client-go/util/homedir Index | Files

package homedir

import "k8s.io/client-go/util/homedir"

Index

Functions

func HomeDir

func HomeDir() string

HomeDir returns the home directory for the current user. On Windows: 1. the first of %HOME%, %HOMEDRIVE%%HOMEPATH%, %USERPROFILE% containing a `.kube\config` file is returned. 2. if none of those locations contain a `.kube\config` file, the first of %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that exists and is writeable is returned. 3. if none of those locations are writeable, the first of %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that exists is returned. 4. if none of those locations exists, the first of %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that is set is returned.

Source Files

homedir.go

Version
v0.24.13
Published
Apr 12, 2023
Platform
js/wasm
Imports
3 packages
Last checked
22 minutes ago

Tools for package owners.