summaryrefslogtreecommitdiff
path: root/findRepos.go
diff options
context:
space:
mode:
Diffstat (limited to 'findRepos.go')
-rw-r--r--findRepos.go34
1 files changed, 18 insertions, 16 deletions
diff --git a/findRepos.go b/findRepos.go
index 2882950..e01ca4b 100644
--- a/findRepos.go
+++ b/findRepos.go
@@ -6,23 +6,25 @@ import (
func findRepos() bool {
var done bool = false
- if argv.FindAll {
- findAll()
- done = true
- }
+ if argv.Find != nil {
+ if argv.Find.All {
+ findAll()
+ done = true
+ }
- if argv.FindPrivate {
- findPrivate()
- done = true
- }
+ if argv.Find.Private {
+ findPrivate()
+ done = true
+ }
- if argv.FindMine {
- findMine()
- done = true
- }
- if argv.FindFavorites {
- findFavorites()
- done = true
+ if argv.Find.Mine {
+ findMine()
+ done = true
+ }
+ if argv.Find.Favorites {
+ findFavorites()
+ done = true
+ }
}
// this is the 'default' behavior when no command line arguments are given
@@ -73,7 +75,7 @@ func findAll() {
for all.Scan() {
repo := all.Next()
me.found.AppendUniqueGoPath(repo)
- if me.forge.Config.IsReadOnly(repo.GetGoPath()) && !argv.FindReadOnly {
+ if me.forge.Config.IsReadOnly(repo.GetGoPath()) && !argv.Find.ReadOnly {
if repo.ReadOnly {
continue
}