oops. go mod tidy makes the go.sum file

This commit is contained in:
Jeff Carr 2024-12-18 22:02:19 -06:00
parent ae64a4d166
commit b91313e96c
2 changed files with 7 additions and 8 deletions

View File

@ -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 {

View File

@ -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
}