summaryrefslogtreecommitdiff
path: root/findNext.go
diff options
context:
space:
mode:
Diffstat (limited to 'findNext.go')
-rw-r--r--findNext.go18
1 files changed, 17 insertions, 1 deletions
diff --git a/findNext.go b/findNext.go
index 9ffb6b7..e67b02a 100644
--- a/findNext.go
+++ b/findNext.go
@@ -115,7 +115,23 @@ func fixGodeps(repo *repolist.RepoRow) bool {
log.Info("boo, you didn't git clone", repo.GoPath())
os.Exit(-1)
}
- check.RedoGoMod()
+ // skip primative ones
+ if check.GetGoPrimitive() {
+ return true
+ }
+ ok, err := check.RedoGoMod()
+ if err != nil {
+ return false
+ }
+ if !ok {
+ log.Info("gitpb.RedoGoMod() returned false", check.GetGoPath())
+ return false
+ }
+ if check.GoDeps == nil {
+ cmd := []string{"go", "mod", "edit", "-go=1.20"}
+ check.Run(cmd)
+ return true
+ }
log.Printf("current repo %s go dependancy count: %d", check.GetGoPath(), check.GoDepsLen())
deps := check.GoDeps.SortByGoPath()
for deps.Scan() {