From b91313e96c0faaa69e2b7712a31885cf8aa2e743 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 18 Dec 2024 22:02:19 -0600 Subject: [PATCH] oops. go mod tidy makes the go.sum file --- doStrict.go | 8 +++++++- redoGoMod.go | 7 ------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/doStrict.go b/doStrict.go index f5e7cfa..aeea171 100644 --- a/doStrict.go +++ b/doStrict.go @@ -53,6 +53,7 @@ func doStrict(repo *gitpb.Repo) error { // actually will re-create go.sum and go.mod now if err := redoGoMod(repo); err != nil { + log.Info(repo.GetGoPath(), "redoGoMod() failed", err) return err } @@ -60,9 +61,14 @@ func doStrict(repo *gitpb.Repo) error { cleanGoDepsCheckOk(repo) // try to trim junk if err := trimGoSum(repo); err != nil { + log.Info(repo.GetGoPath(), "trimGoSum() failed", err) return err } - repo.ParseGoSum() + if repo.ParseGoSum() { + log.Info(repo.GetGoPath(), "ParseGoSum() ok") + } else { + log.Info(repo.GetGoPath(), "ParseGoSum() failed") + } // check go.sum file if err := cleanGoDepsCheckOk(repo); err != nil { diff --git a/redoGoMod.go b/redoGoMod.go index ca9b536..2d58aa2 100644 --- a/redoGoMod.go +++ b/redoGoMod.go @@ -51,12 +51,6 @@ func redoGoMod(repo *gitpb.Repo) error { return err } - // check to see if this is primitive - repo.ParseGoSum() - if repo.GetGoPrimitive() { - return nil - } - if result, err := goTidy(repo.FullPath); err != nil { if tinyFixer(result) { if _, err := goTidy(repo.FullPath); err != nil { @@ -73,7 +67,6 @@ func redoGoMod(repo *gitpb.Repo) error { // parse the go.mod and go.sum files if repo.ParseGoSum() { - // this is primitive return nil }