diff options
Diffstat (limited to 'addpath.go')
| -rw-r--r-- | addpath.go | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/addpath.go b/addpath.go deleted file mode 100644 index 22f6c1e..0000000 --- a/addpath.go +++ /dev/null @@ -1,27 +0,0 @@ -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 -} |
