package env import ( "os" "strings" "go.wit.com/log" ) // this is an experiment at this point to // see how this turns out // adds a path to the ENV func AddPath(newpath string) bool { path := os.Getenv("PATH") for _, p := range strings.Split(path, ":") { log.Info("Looking at path:", p) if p == newpath { log.Info("FOUND path:", p) return false } } path = path + ":" + newpath log.Info("ADDING PATH:", path) os.Setenv("PATH", path) return true }