This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
tomo-old/nasin/unix.go

23 lines
471 B
Go

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