Blame vendor/github.com/mitchellh/go-homedir/README.md

Packit Service 4d2de5
# go-homedir
Packit Service 4d2de5
Packit Service 4d2de5
This is a Go library for detecting the user's home directory without
Packit Service 4d2de5
the use of cgo, so the library can be used in cross-compilation environments.
Packit Service 4d2de5
Packit Service 4d2de5
Usage is incredibly simple, just call `homedir.Dir()` to get the home directory
Packit Service 4d2de5
for a user, and `homedir.Expand()` to expand the `~` in a path to the home
Packit Service 4d2de5
directory.
Packit Service 4d2de5
Packit Service 4d2de5
**Why not just use `os/user`?** The built-in `os/user` package requires
Packit Service 4d2de5
cgo on Darwin systems. This means that any Go code that uses that package
Packit Service 4d2de5
cannot cross compile. But 99% of the time the use for `os/user` is just to
Packit Service 4d2de5
retrieve the home directory, which we can do for the current user without
Packit Service 4d2de5
cgo. This library does that, enabling cross-compilation.