Fix unix search path

This commit is contained in:
世界 2022-08-24 12:14:56 +08:00
parent f87baf08d3
commit 236c034c62
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -1,4 +1,4 @@
//go:build unix
//go:build unix || linux
package constant
@ -7,9 +7,9 @@ import (
)
func init() {
resourcePaths = append(resourcePaths, "/etc/config")
resourcePaths = append(resourcePaths, "/etc")
resourcePaths = append(resourcePaths, "/usr/share")
resourcePaths = append(resourcePaths, "/usr/local/etc/config")
resourcePaths = append(resourcePaths, "/usr/local/etc")
resourcePaths = append(resourcePaths, "/usr/local/share")
if homeDir := os.Getenv("HOME"); homeDir != "" {
resourcePaths = append(resourcePaths, homeDir+"/.local/share")