2 ms·
Not sure about use in the Go community at large but Go introduced os.UserConfigDir[1] which is portable across Windows, macOS, Plan 9 and Linux/BSD as per XDG b
by olowe 2mo ago
Not sure about use in the Go community at large but Go introduced os.UserConfigDir[1] which is portable across Windows, macOS, Plan 9 and Linux/BSD as per XDG back in 2019. Also CacheDir.
[1]: https://pkg.go.dev/os#UserConfigDir https://pkg.go.dev/os#UserConfigDir
- maleldil 2mo ago> On Darwin, it returns $HOME/Library/Application Support Which is not the behaviour most people would think is sensible, especially for CLI programs.
- frantathefranta 2mo agoGhostty has chosen to use that as the default and I feel like it's going to be the tipping point where people will assume $HOME/Library/Application Support is normal for CLI programs.
- gcr 2mo agoMac users are used to checking ~/Library/Application Support/App, ~/.app, and ~/.local/config/app
- jonaustin 2mo agofwiw, it absolutely drives me nuts that cli programs are putting configs in that hard to reach folder (long path name and _spaces_ in the folder name ugh)