summaryrefslogtreecommitdiff
path: root/doCheckout.go
diff options
context:
space:
mode:
Diffstat (limited to 'doCheckout.go')
-rw-r--r--doCheckout.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/doCheckout.go b/doCheckout.go
index a4d6b2a..85e4fdb 100644
--- a/doCheckout.go
+++ b/doCheckout.go
@@ -11,7 +11,7 @@ var ErrorNotAllReposOnMaster error = fmt.Errorf("not all repos on are on the mas
var ErrorNotAllReposOnDevel error = fmt.Errorf("not all repos on are on the devel branch")
var ErrorNotAllReposOnUser error = fmt.Errorf("not all repos on are on the user branch")
-func IsEverythingOnMaster() error {
+func IsEverythingOnMaster() (int, int, error) {
var total int
var count int
var nope int
@@ -30,12 +30,12 @@ func IsEverythingOnMaster() error {
log.Printf("Master branch check. %d total repos. (%d ok) (%d not on master branch)\n", total, count, nope)
if total != count {
// log.Info(ErrorNotAllReposOnMaster)
- return ErrorNotAllReposOnMaster
+ return total, count, ErrorNotAllReposOnMaster
}
- return nil
+ return total, count, nil
}
-func IsEverythingOnDevel() error {
+func IsEverythingOnDevel() (int, int, error) {
var total int
var count int
@@ -50,12 +50,12 @@ func IsEverythingOnDevel() error {
}
log.Printf("Devel branch check. %d total repos. %d repos on the devel branch\n", total, count)
if total != count {
- return ErrorNotAllReposOnDevel
+ return total, count, ErrorNotAllReposOnDevel
}
- return nil
+ return total, count, nil
}
-func IsEverythingOnUser() error {
+func IsEverythingOnUser() (int, int, error) {
var total int
var count int
@@ -70,9 +70,9 @@ func IsEverythingOnUser() error {
}
log.Printf("User branch check. %d total repos. %d repos on the user branch\n", total, count)
if total != count {
- return ErrorNotAllReposOnUser
+ return total, count, ErrorNotAllReposOnUser
}
- return nil
+ return total, count, nil
}
func doGitReset() {
@@ -113,7 +113,7 @@ func doAllCheckoutUser() error {
if count != 0 {
me.forge.ConfigSave()
}
- if err := IsEverythingOnUser(); err != nil {
+ if _, _, err := IsEverythingOnUser(); err != nil {
// display all repos not on user
me.found = new(gitpb.Repos)
all := me.forge.Repos.SortByFullPath()
@@ -149,7 +149,7 @@ func doAllCheckoutDevel() error {
if count != 0 {
me.forge.ConfigSave()
}
- if err := IsEverythingOnDevel(); err != nil {
+ if _, _, err := IsEverythingOnDevel(); err != nil {
// display all repos not on user
me.found = new(gitpb.Repos)
all := me.forge.Repos.SortByFullPath()
@@ -206,7 +206,7 @@ func doAllCheckoutMaster() error {
me.forge.ConfigSave()
}
- if err := IsEverythingOnMaster(); err != nil {
+ if _, _, err := IsEverythingOnMaster(); err != nil {
// display all repos not on master
me.found = new(gitpb.Repos)
all := me.forge.Repos.SortByFullPath()