diff options
| author | Jeff Carr <[email protected]> | 2024-12-10 01:48:29 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-10 01:48:29 -0600 |
| commit | 757fd9ba55ff84f088e4cb037ea0a49b7f4211d0 (patch) | |
| tree | 9636624294e9b4d50c13e9a4c8bad9f6f9a08e81 /init.go | |
| parent | c08079fc2fba6d5dd65bc878e51dc59680f2de5e (diff) | |
go.work file fixes
Diffstat (limited to 'init.go')
| -rw-r--r-- | init.go | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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 } |
