github.com/inazumav/sing-box@v0.0.0-20230926072359-ab51429a14f1/constant/path_unix.go (about)

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