summaryrefslogtreecommitdiff
path: root/goDep.redoGoMod.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-30 02:03:32 -0600
committerJeff Carr <[email protected]>2024-11-30 02:03:32 -0600
commit3de739288be1394cc1679c4391058173984e5873 (patch)
tree585f127eb88abcd6ab28c36e635dc3ae72150ccf /goDep.redoGoMod.go
parent5d28c6741ab043ae1deeca6bf4ff4c4d8ea4d455 (diff)
moving go.mod handling herev0.0.2
Diffstat (limited to 'goDep.redoGoMod.go')
-rw-r--r--goDep.redoGoMod.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/goDep.redoGoMod.go b/goDep.redoGoMod.go
index 81e861f..ccf64ef 100644
--- a/goDep.redoGoMod.go
+++ b/goDep.redoGoMod.go
@@ -16,7 +16,7 @@ import (
// repos you can also type "make redomod" to do the same thing
// since it's a Makefile task that is also useful to be able to run
// from the command line
-func (repo *Repo) MakeRedomod() (bool, error) {
+func (repo *Repo) RedoGoMod() (bool, error) {
// unset the go development ENV var to generate release files
os.Unsetenv("GO111MODULE")
if ok, err := repo.strictRun([]string{"rm", "-f", "go.mod", "go.sum"}); !ok {
@@ -32,12 +32,11 @@ func (repo *Repo) MakeRedomod() (bool, error) {
return ok, err
}
// most things should build with golang after 1.20
- // TODO: move this to autogenpb
if ok, err := repo.strictRun([]string{"go", "mod", "edit", "-go=1.20"}); !ok {
log.Warn("go mod edit failed", err)
return ok, err
}
- log.Info("MakeRedomod() worked", repo.GoPath)
+ // log.Info("MakeRedomod() worked", repo.GoPath)
if repo.Exists("go.sum") {
// return the attempt to parse go.mod & go.sum
@@ -89,6 +88,9 @@ func (repo *Repo) parseGoSum() (bool, error) {
GoPath: godep,
Version: version,
}
+ if repo.GoDeps == nil {
+ repo.GoDeps = new(GoDeps)
+ }
repo.GoDeps.AppendUniqueGoPath(&new1)
/*
found := repo.FindGoDepByPath(godep)