'all' seems more sensible than 'loop'

This commit is contained in:
Jeff Carr 2024-12-11 19:32:04 -06:00
parent 353290ecb1
commit ada387b966
5 changed files with 33 additions and 33 deletions

View File

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

View File

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

View File

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

View File

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

View File

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