now using the awesome golang 1.24 'iter'

This commit is contained in:
Jeff Carr 2025-03-19 06:40:27 -05:00
parent b4a15ef947
commit 68127e4356
2 changed files with 3 additions and 9 deletions

View File

@ -58,9 +58,7 @@ func (f *Forge) PrintHumanTableDirty(allr *gitpb.Repos) {
// log.Info(standardStart5("gopath", "cur name", "master", "user", "repo type")) // log.Info(standardStart5("gopath", "cur name", "master", "user", "repo type"))
log.Info(standardTable10("repopath", "cur br", "age", "master", "devel", "user", "curver", "lasttag", "next", "repo type")) log.Info(standardTable10("repopath", "cur br", "age", "master", "devel", "user", "curver", "lasttag", "next", "repo type"))
// all := allr.SortByFullPath() // all := allr.SortByFullPath()
all := allr.All() for repo := range allr.IterAll() {
for all.Scan() {
repo := all.Next()
f.printRepoToTable(repo) f.printRepoToTable(repo)
if len(repo.DirtyList) != 0 { if len(repo.DirtyList) != 0 {
for _, line := range repo.DirtyList { for _, line := range repo.DirtyList {

View File

@ -76,9 +76,7 @@ var RillY int = 10
// todo: store x,y in forge config ? (or compute them. notsure) // todo: store x,y in forge config ? (or compute them. notsure)
func (f *Forge) RillReload() int { func (f *Forge) RillReload() int {
var all []*gitpb.Repo var all []*gitpb.Repo
tmp := f.Repos.All() for repo := range f.Repos.IterAll() {
for tmp.Scan() {
repo := tmp.Next()
if !repo.IsValidDir() { if !repo.IsValidDir() {
log.Printf("%s %-50s", "got an invalid repo in forgepb.RillFuncError()", repo.GetGoPath()) log.Printf("%s %-50s", "got an invalid repo in forgepb.RillFuncError()", repo.GetGoPath())
continue continue
@ -114,9 +112,7 @@ func (f *Forge) RillReload() int {
// todo: store x,y in forge config ? (or compute them. notsure) // todo: store x,y in forge config ? (or compute them. notsure)
func (f *Forge) RillFuncError(rillf func(*gitpb.Repo) error) int { func (f *Forge) RillFuncError(rillf func(*gitpb.Repo) error) int {
var all []*gitpb.Repo var all []*gitpb.Repo
tmp := f.Repos.All() for repo := range f.Repos.IterAll() {
for tmp.Scan() {
repo := tmp.Next()
if !repo.IsValidDir() { if !repo.IsValidDir() {
log.Printf("%s %-50s", "got an invalid repo in forgepb.RillFuncError()", repo.GetGoPath()) log.Printf("%s %-50s", "got an invalid repo in forgepb.RillFuncError()", repo.GetGoPath())
continue continue