HomeFolder returns the users homefolder this will be $HOME on windows and mac and USERPROFILE on windows
()
| 9 | // HomeFolder returns the users homefolder this will be $HOME on windows and mac and |
| 10 | // USERPROFILE on windows |
| 11 | func HomeFolder() string { |
| 12 | if runtime.GOOS == "windows" { |
| 13 | return os.Getenv("USERPROFILE") |
| 14 | |
| 15 | } |
| 16 | |
| 17 | return os.Getenv("HOME") |
| 18 | } |
| 19 | |
| 20 | // TargetHome returns the location of the target |
| 21 | // folder, usually $HOME/.target |