diff options
| author | Jeff Carr <[email protected]> | 2025-09-03 13:54:12 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-03 13:54:12 -0500 |
| commit | fc25cd8b055c31b58dd199de7931ed047bbe99aa (patch) | |
| tree | 8669268f27d561bd78fce4c8c3f7a0db584d0ea7 /goWork.go | |
| parent | cc5db9ba7ea3d4b636ea2870fe0a3f3decaa9177 (diff) | |
rewrite a standard ENV function
Diffstat (limited to 'goWork.go')
| -rw-r--r-- | goWork.go | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/goWork.go b/goWork.go deleted file mode 100644 index 7dbfac9..0000000 --- a/goWork.go +++ /dev/null @@ -1,34 +0,0 @@ -package fhelp - -import ( - "os" - - "go.wit.com/log" -) - -/* -try to determine the GO working dir -this will look for a go.work file, otherwise -it will default to ~/go/src - -returns: -string # ~/go/src or the path to the go.work file -bool # true if the user is using a go.work file -err # if everything goes wrong, the error -*/ -func DetermineGoPath() (string, bool, error) { - gosrc := os.Getenv("FORGE_GOSRC") - if gosrc != "" { - hasWork := goWorkExists(gosrc) - log.Info("Using ENV{FORGE_GOSRC} =", gosrc) - return gosrc, hasWork, nil - } - - gosrc, err := findGoSrc() - if err != nil { - log.Info("fhelp.DetermineGoPath()", err) - } - hasWork := goWorkExists(gosrc) - - return gosrc, hasWork, err -} |
