fs.go 271 B

12345678910111213141516171819
  1. package fs
  2. import (
  3. "os"
  4. )
  5. func DataHome() string {
  6. xdgDataHome, _ := os.LookupEnv("XDG_DATA_HOME")
  7. if xdgDataHome == "" {
  8. user, err := os.UserHomeDir()
  9. if err != nil {
  10. panic(err)
  11. }
  12. xdgDataHome = user + "/.local/share"
  13. }
  14. return xdgDataHome + "/eeze"
  15. }