diff --git a/doCheckout.go b/doCheckout.go index 220ea22..8621cc9 100644 --- a/doCheckout.go +++ b/doCheckout.go @@ -24,9 +24,7 @@ func IsEverythingOnMaster() (int, int, int, error) { var nope int // first make sure every repo is on the master branch - all := me.forge.Repos.All() - for all.Scan() { - repo := all.Next() + for repo := range me.forge.Repos.IterAll() { total += 1 if repo.GetMasterBranchName() == repo.GetCurrentBranchName() { count += 1 @@ -47,9 +45,7 @@ func IsEverythingOnDevel() (int, int, int, error) { var nope int // first make sure every repo is on the master branch - all := me.forge.Repos.All() - for all.Scan() { - repo := all.Next() + for repo := range me.forge.Repos.IterAll() { total += 1 if repo.GetDevelBranchName() == repo.GetCurrentBranchName() { count += 1 @@ -69,9 +65,7 @@ func IsEverythingOnUser() (int, int, int, error) { var nope int // first make sure every repo is on the master branch - all := me.forge.Repos.All() - for all.Scan() { - repo := all.Next() + for repo := range me.forge.Repos.IterAll() { total += 1 if repo.GetCurrentBranchName() == repo.GetUserBranchName() { count += 1 diff --git a/doCommit.go b/doCommit.go index 461af47..4841a1c 100644 --- a/doCommit.go +++ b/doCommit.go @@ -16,10 +16,8 @@ func doCommit() { log.Info("do a commit everywhere") doCheckDirtyAndConfigSave() found := findDirty() - all := found.All() var newpatches bool - for all.Scan() { - repo := all.Next() + for repo := range found.IterAll() { log.Info("do a commit on repo", repo.GetGoPath()) if err := doCommitRepo(repo); err != nil { badExit(err)