Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
func Get() string
Get returns the home directory of the current user with the help of environment variables depending on the target operating system. Returned path should be used with "path/filepath" to form new paths.
func GetShortcutString ¶
func GetShortcutString() string
GetShortcutString returns the string that is shortcut to user's home directory in the native shell of the platform running on.
func GetWithSudoUser ¶
func GetWithSudoUser() string
GetWithSudoUser returns the home directory of the user who called sudo (if available, retrieved from $SUDO_USER). It fallbacks to Get if any error occurs. Returned path should be used with "path/filepath" to form new paths.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.