homedir: gomodules.xyz/homedir Index | Files

package homedir

import "gomodules.xyz/homedir"

Index

Package Files

homedir.go

func HomeDir Uses

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.

Package homedir imports 3 packages (graph) and is imported by 1 packages. Updated 2020-11-06. Refresh now. Tools for package owners.