1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-30 09:16:47 +02:00
lazygit/vendor/github.com/mitchellh/go-homedir
Glenn Vriesman 3f7e107d09 Vendor: Updated dependencies
* Updated go.mod
 * Updated go.sum
 * Updated vendor packages

Signed-off-by: Glenn Vriesman <glenn.vriesman@gmail.com>
2019-11-10 23:23:20 +11:00
..
go.mod Vendor: Updated dependencies 2019-11-10 23:23:20 +11:00
homedir.go Vendor: Updated dependencies 2019-11-10 23:23:20 +11:00
LICENSE bump dependencies 2018-08-09 14:41:58 +10:00
README.md switch to Go modules 2019-09-01 21:24:03 +10:00

go-homedir

This is a Go library for detecting the user's home directory without the use of cgo, so the library can be used in cross-compilation environments.

Usage is incredibly simple, just call homedir.Dir() to get the home directory for a user, and homedir.Expand() to expand the ~ in a path to the home directory.

Why not just use os/user? The built-in os/user package requires cgo on Darwin systems. This means that any Go code that uses that package cannot cross compile. But 99% of the time the use for os/user is just to retrieve the home directory, which we can do for the current user without cgo. This library does that, enabling cross-compilation.