start using go-mod-clean

This commit is contained in:
Jeff Carr 2024-12-13 12:33:30 -06:00
parent 9d183050eb
commit 682acb3481
1 changed files with 5 additions and 12 deletions

View File

@ -2,24 +2,17 @@ package main
// An app to submit patches for the 30 GO GUI repos // An app to submit patches for the 30 GO GUI repos
import (
"os"
"go.wit.com/log"
)
func doRedoGoMod() { func doRedoGoMod() {
me.forge.RillRedoGoMod() // me.forge.RillRedoGoMod()
os.Exit(0)
all := me.forge.Repos.SortByGoPath() all := me.forge.Repos.SortByGoPath()
for all.Scan() { for all.Scan() {
repo := all.Next() repo := all.Next()
if !repo.IsValid() { if err := repo.ValidGoSum(); err == nil {
log.Printf("%10s %-50s", "old?", repo.GetGoPath())
continue continue
} }
log.Printf("running on: %-50s", repo.GetGoPath()) if err := repo.RunStrict([]string{"go-mod-clean"}); err != nil {
repo.RedoGoMod() badExit(err)
}
} }
} }