diff options
| author | Jeff Carr <[email protected]> | 2024-12-24 01:54:33 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-24 01:54:33 -0600 |
| commit | bd332301bea8c53d9ee1fe8da79da3c19176fbf2 (patch) | |
| tree | 2aff858da422cdc04885f4c7fd14a28319d4c84f /findRepos.go | |
| parent | c5fcb2a6c05293cd6e14b3bd1e91237013508d44 (diff) | |
use subcommands
Diffstat (limited to 'findRepos.go')
| -rw-r--r-- | findRepos.go | 34 |
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 } |
