//go:build linux || darwin || freebsd package tomo import "os" import "strings" import "path/filepath" var userDataDir string func init () { pathVariable := os.Getenv("TOMO_PLUGIN_PATH") pluginPaths = strings.Split(pathVariable, ":") pluginPaths = append ( pluginPaths, "/usr/lib/tomo/plugins", "/usr/local/lib/tomo/plugins") homeDir, err := os.UserHomeDir() if err == nil { pluginPaths = append ( pluginPaths, filepath.Join(homeDir, ".local/lib/tomo/plugins")) } userDataDir = filepath.Join(homeDir, ".local/share") }