Command line client for Write.as https://write.as/apps/cli
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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