golang 1.24 'iter'
This commit is contained in:
parent
4b2ac683b7
commit
9aa086e7c4
|
@ -24,9 +24,7 @@ func IsEverythingOnMaster() (int, int, int, error) {
|
||||||
var nope int
|
var nope int
|
||||||
|
|
||||||
// first make sure every repo is on the master branch
|
// first make sure every repo is on the master branch
|
||||||
all := me.forge.Repos.All()
|
for repo := range me.forge.Repos.IterAll() {
|
||||||
for all.Scan() {
|
|
||||||
repo := all.Next()
|
|
||||||
total += 1
|
total += 1
|
||||||
if repo.GetMasterBranchName() == repo.GetCurrentBranchName() {
|
if repo.GetMasterBranchName() == repo.GetCurrentBranchName() {
|
||||||
count += 1
|
count += 1
|
||||||
|
@ -47,9 +45,7 @@ func IsEverythingOnDevel() (int, int, int, error) {
|
||||||
var nope int
|
var nope int
|
||||||
|
|
||||||
// first make sure every repo is on the master branch
|
// first make sure every repo is on the master branch
|
||||||
all := me.forge.Repos.All()
|
for repo := range me.forge.Repos.IterAll() {
|
||||||
for all.Scan() {
|
|
||||||
repo := all.Next()
|
|
||||||
total += 1
|
total += 1
|
||||||
if repo.GetDevelBranchName() == repo.GetCurrentBranchName() {
|
if repo.GetDevelBranchName() == repo.GetCurrentBranchName() {
|
||||||
count += 1
|
count += 1
|
||||||
|
@ -69,9 +65,7 @@ func IsEverythingOnUser() (int, int, int, error) {
|
||||||
var nope int
|
var nope int
|
||||||
|
|
||||||
// first make sure every repo is on the master branch
|
// first make sure every repo is on the master branch
|
||||||
all := me.forge.Repos.All()
|
for repo := range me.forge.Repos.IterAll() {
|
||||||
for all.Scan() {
|
|
||||||
repo := all.Next()
|
|
||||||
total += 1
|
total += 1
|
||||||
if repo.GetCurrentBranchName() == repo.GetUserBranchName() {
|
if repo.GetCurrentBranchName() == repo.GetUserBranchName() {
|
||||||
count += 1
|
count += 1
|
||||||
|
|
|
@ -16,10 +16,8 @@ func doCommit() {
|
||||||
log.Info("do a commit everywhere")
|
log.Info("do a commit everywhere")
|
||||||
doCheckDirtyAndConfigSave()
|
doCheckDirtyAndConfigSave()
|
||||||
found := findDirty()
|
found := findDirty()
|
||||||
all := found.All()
|
|
||||||
var newpatches bool
|
var newpatches bool
|
||||||
for all.Scan() {
|
for repo := range found.IterAll() {
|
||||||
repo := all.Next()
|
|
||||||
log.Info("do a commit on repo", repo.GetGoPath())
|
log.Info("do a commit on repo", repo.GetGoPath())
|
||||||
if err := doCommitRepo(repo); err != nil {
|
if err := doCommitRepo(repo); err != nil {
|
||||||
badExit(err)
|
badExit(err)
|
||||||
|
|
Loading…
Reference in New Issue