23 lines
466 B
Go
23 lines
466 B
Go
|
//go:build linux || darwin || freebsd
|
||
|
|
||
|
package tomo
|
||
|
|
||
|
import "os"
|
||
|
import "strings"
|
||
|
import "path/filepath"
|
||
|
|
||
|
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"))
|
||
|
}
|
||
|
}
|