Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var LookupEnvFunc = os.LookupEnv
LookupEnvFunc is a function used to get environment variables. It is useful for unit testing.
Functions ¶
func ExpandUser ¶
ExpandUser expands a tidle prefix of the specified path by calling either Posix or NT.
func HomePosix ¶
HomePosix returns the home directory of the current user using non-Windows semantics. If the HOME environment variable is present it returns its value. Otherwise, it looks for an entry in the /etc/passwd file with at least 6 fields and a uid equal to os.Getuid(). If such an entry is found then returns the 6th field of the entry. If the before mentioned return conditions cannot be met an error is returned.
func NT ¶
NT expands a tidle prefix of the specified path using Windows semantics. Ported from expanduser in https://github.com/python/cpython/blob/master/Lib/ntpath.py.
func Posix ¶
Posix expands a tidle prefix of the specified path using posix semantics. Ported from expanduser https://github.com/python/cpython/blob/master/Lib/posixpath.py.
Types ¶
This section is empty.