diff --git a/main.go b/main.go index 3f3a057..e109bd1 100644 --- a/main.go +++ b/main.go @@ -29,6 +29,23 @@ func main() { // may exit list() + if argv.RedoGoMod { + repos := me.forge.Repos.SortByGoPath() + for repos.Scan() { + repo := repos.Next() + if !repo.IsValid() { + log.Printf("%10s %-50s", "old?", repo.GetGoPath()) + continue + } + if me.forge.IsReadOnly(repo.GetGoPath()) { + log.Printf("%10s %-50s", "readonly", repo.GetGoPath()) + continue + } + repo.RedoGoMod() + } + os.Exit(0) + } + me.myGui = gui.New() me.myGui.Default()