summaryrefslogtreecommitdiff
path: root/doCheckout.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-03-19 06:40:02 -0500
committerJeff Carr <[email protected]>2025-03-19 06:40:02 -0500
commit9aa086e7c41c9297ab7a19d4f536d5d79fffeaac (patch)
tree901c2dee0216707bbf8b84d1010ff7b79a6679d2 /doCheckout.go
parent4b2ac683b7725cec816e3e31f7512b7e3f082722 (diff)
golang 1.24 'iter'
Diffstat (limited to 'doCheckout.go')
-rw-r--r--doCheckout.go12
1 files changed, 3 insertions, 9 deletions
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