summaryrefslogtreecommitdiff
path: root/addpath.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-28 04:35:07 -0500
committerJeff Carr <[email protected]>2025-10-28 04:35:07 -0500
commit05d09b7584b4cd18676c68dd161142044437a7af (patch)
tree59ada03a3c607f6d7a383da4adcedf5654fa202c /addpath.go
parent59effd5ceba6f28e2bc2edd2b927abb4556f63b5 (diff)
load custom env files
Diffstat (limited to 'addpath.go')
-rw-r--r--addpath.go27
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
-}