path_unix.go 412 B

1234567891011121314151617
  1. //go:build unix || linux
  2. package constant
  3. import (
  4. "os"
  5. )
  6. func init() {
  7. resourcePaths = append(resourcePaths, "/etc")
  8. resourcePaths = append(resourcePaths, "/usr/share")
  9. resourcePaths = append(resourcePaths, "/usr/local/etc")
  10. resourcePaths = append(resourcePaths, "/usr/local/share")
  11. if homeDir := os.Getenv("HOME"); homeDir != "" {
  12. resourcePaths = append(resourcePaths, homeDir+"/.local/share")
  13. }
  14. }