summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'init.go')
-rw-r--r--init.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/init.go b/init.go
index 618bf60..ac4e092 100644
--- a/init.go
+++ b/init.go
@@ -34,9 +34,12 @@ func Init() *Forge {
fullpath := filepath.Join(homeDir, ".config/forge")
os.Setenv("FORGE_CONFIG", fullpath)
}
+ if f.goWorkExists() {
+ f.goWork = true
+ }
log.Info("forgepbb.Init() ~/go/src ", f.goSrc)
log.Info("forgepbb.Init() 2 FORGE_CONFIG", os.Getenv("FORGE_CONFIG"))
- log.Info("forgepbb.Init() 2 FORGE_GOSRC", os.Getenv("FORGE_GOSRC"))
+ log.Info("forgepbb.Init() 2 FORGE_GOSRC", os.Getenv("FORGE_GOSRC"), "f.goWork =", f.IsGoWork())
// cache.go has Do()
// f.initOnce.Do(f.initWork)
@@ -63,5 +66,11 @@ func Init() *Forge {
f.ScanGoSrc()
end := f.Repos.Len()
log.Info("forge.ScanGoSrc() Found", end-start, "new repos in", f.goSrc)
+ testenv := os.Getenv("GO111MODULE")
+ if testenv == "off" {
+ log.Info("GO111MODULE=off", "f.goWork =", f.IsGoWork(), "f.gosrc =", f.GetGoSrc())
+ } else {
+ log.Info("GO111MODULE=", testenv, "f.goWork =", f.IsGoWork(), "f.gosrc =", f.GetGoSrc())
+ }
return f
}