summaryrefslogtreecommitdiff
path: root/cleanGoSum.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-13 20:31:55 -0600
committerJeff Carr <[email protected]>2024-12-13 20:31:55 -0600
commite90127b54a7e86c1ff996a349f102ac5c27e049b (patch)
treec302a7bc28475b4e34e8b8639dee157a0ac43648 /cleanGoSum.go
parent22c29b3625f4fac9a345cc3734625f71cc90244e (diff)
attempt hacky fixv0.0.2
Diffstat (limited to 'cleanGoSum.go')
-rw-r--r--cleanGoSum.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cleanGoSum.go b/cleanGoSum.go
index 76e5037..d452e47 100644
--- a/cleanGoSum.go
+++ b/cleanGoSum.go
@@ -18,6 +18,7 @@ import (
// matches the go.sum file
func cleanGoDepsCheckOk(check *gitpb.Repo) error {
var err error = nil
+ var fixes [][]string
log.Printf("current repo %s go dependancy count: %d", check.GetGoPath(), check.GoDepsLen())
all := check.GoDeps.SortByGoPath()
for all.Scan() {
@@ -60,11 +61,17 @@ func cleanGoDepsCheckOk(check *gitpb.Repo) error {
depRepo.GetVersion(), found.GetMasterVersion(), ends)
errs := fmt.Sprintf("%s error %s vs %s %s", depRepo.GetGoPath(),
depRepo.GetVersion(), found.GetMasterVersion(), ends)
+ cmd := []string{"go", "get", depRepo.GetGoPath() + "@" + found.GetMasterVersion()}
+ fixes = append(fixes, cmd)
err = errors.New(errs)
}
}
}
}
+ for i, cmd := range fixes {
+ log.Info("try cmd", i, cmd)
+ check.RunRealtime(cmd)
+ }
return err
}