From ada387b966b901055e87e5b7d7d4902246c4e69e Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 11 Dec 2024 19:32:04 -0600 Subject: [PATCH] 'all' seems more sensible than 'loop' --- cobol.go | 6 +++--- doRedoGoMod.go | 6 +++--- findConfig.go | 12 ++++++------ findRepos.go | 24 ++++++++++++------------ subitPatches.go | 18 +++++++++--------- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/cobol.go b/cobol.go index 0812370..4c2263d 100644 --- a/cobol.go +++ b/cobol.go @@ -34,9 +34,9 @@ func doCobol() { log.DaemonMode(true) log.Info(standardStart5("gopath", "cur name", "master", "user", "repo type")) - repos := me.found.SortByGoPath() - for repos.Scan() { - repo := repos.Next() + all := me.found.SortByGoPath() + for all.Scan() { + repo := all.Next() verifyPrint(repo) } } diff --git a/doRedoGoMod.go b/doRedoGoMod.go index 6e9f979..238ab2a 100644 --- a/doRedoGoMod.go +++ b/doRedoGoMod.go @@ -11,9 +11,9 @@ import ( func doRedoGoMod() { me.forge.RillRedoGoMod() os.Exit(0) - repos := me.forge.Repos.SortByGoPath() - for repos.Scan() { - repo := repos.Next() + all := me.forge.Repos.SortByGoPath() + for all.Scan() { + repo := all.Next() if !repo.IsValid() { log.Printf("%10s %-50s", "old?", repo.GetGoPath()) continue diff --git a/findConfig.go b/findConfig.go index efe6ee2..3586bad 100644 --- a/findConfig.go +++ b/findConfig.go @@ -22,9 +22,9 @@ func findConfig() bool { // finds config repos that are writable func findConfigMine() { - loop := me.forge.Config.SortByGoPath() - for loop.Scan() { - r := loop.Next() + all := me.forge.Config.SortByGoPath() + for all.Scan() { + r := all.Next() gopath := r.GoPath if r.GetDirectory() { continue @@ -39,9 +39,9 @@ func findConfigMine() { // get everything in your config func findConfigAll() { - loop := me.forge.Config.SortByGoPath() - for loop.Scan() { - r := loop.Next() + all := me.forge.Config.SortByGoPath() + for all.Scan() { + r := all.Next() gopath := r.GoPath if r.GetDirectory() { continue diff --git a/findRepos.go b/findRepos.go index 18ddd03..3562802 100644 --- a/findRepos.go +++ b/findRepos.go @@ -35,9 +35,9 @@ func findRepos() bool { } func findPrivate() { - repos := me.forge.Repos.SortByGoPath() - for repos.Scan() { - repo := repos.Next() + all := me.forge.Repos.SortByGoPath() + for all.Scan() { + repo := all.Next() if me.forge.Config.IsPrivate(repo.GoPath) { me.found.AppendUniqueGoPath(repo) } @@ -47,9 +47,9 @@ func findPrivate() { // finds repos that are writable func findMine() { // log.Printf("get mine %s\n", me.forge.GetGoSrc()) - repos := me.forge.Repos.SortByGoPath() - for repos.Scan() { - repo := repos.Next() + all := me.forge.Repos.SortByGoPath() + for all.Scan() { + repo := all.Next() if me.forge.Config.IsWritable(repo.GoPath) { me.found.AppendUniqueGoPath(repo) } @@ -59,9 +59,9 @@ func findMine() { // finds repos that are writable func findFavorites() { // log.Printf("get favorites %s\n", me.forge.GetGoSrc()) - repos := me.forge.Repos.SortByGoPath() - for repos.Scan() { - repo := repos.Next() + all := me.forge.Repos.SortByGoPath() + for all.Scan() { + repo := all.Next() if me.forge.Config.IsFavorite(repo.GoPath) { me.found.AppendUniqueGoPath(repo) } @@ -70,9 +70,9 @@ func findFavorites() { func findAll() { var configsave bool - repos := me.forge.Repos.SortByGoPath() - for repos.Scan() { - repo := repos.Next() + all := me.forge.Repos.SortByGoPath() + for all.Scan() { + repo := all.Next() if me.forge.Config.IsReadOnly(repo.GoPath) && !argv.FindReadOnly { if repo.ReadOnly { continue diff --git a/subitPatches.go b/subitPatches.go index ea1e099..bad9786 100644 --- a/subitPatches.go +++ b/subitPatches.go @@ -57,9 +57,9 @@ func submitPatchesBox(box *gui.Node) *patchSummary { s.grid.NewButton("Update Patch Counts", func() { var repocount, patchcount int // broken after move to forge protobuf - loop := me.forge.Repos.SortByGoPath() - for loop.Scan() { - repo := loop.Next() + all := me.forge.Repos.SortByGoPath() + for all.Scan() { + repo := all.Next() if repo.GetReadOnly() { continue } @@ -75,9 +75,9 @@ func submitPatchesBox(box *gui.Node) *patchSummary { repocount = 0 patchcount = 0 // broken after move to forge protobuf - loop = me.forge.Repos.SortByGoPath() - for loop.Scan() { - repo := loop.Next() + all = me.forge.Repos.SortByGoPath() + for all.Scan() { + repo := all.Next() if repo.GetReadOnly() { continue } @@ -189,9 +189,9 @@ func (s *patchSummary) Update() { var userT, develT, masterT int // var userP, develP, masterP int // broken after move to forge protobuf - loop := me.forge.Repos.SortByGoPath() - for loop.Scan() { - repo := loop.Next() + all := me.forge.Repos.SortByGoPath() + for all.Scan() { + repo := all.Next() total += 1 if repo.IsDirty() { dirty += 1