diff options
Diffstat (limited to 'find.go')
| -rw-r--r-- | find.go | 29 |
1 files changed, 23 insertions, 6 deletions
@@ -14,6 +14,23 @@ import ( // // by default, it adds every repo +func doFind() *gitpb.Repos { + if argv.List == nil { + return findAll() + } + + if argv.List.Mine { + findMine() + return me.found + } + + if argv.List.Dirty { + return findDirty() + } + + return findAll() +} + func (f *FindCmd) findRepos() *gitpb.Repos { if f == nil { findMine() @@ -21,8 +38,7 @@ func (f *FindCmd) findRepos() *gitpb.Repos { } if f.All { - findAll() - return me.found + return findAll() } if f.Private { @@ -49,8 +65,7 @@ func (f *FindCmd) findRepos() *gitpb.Repos { return me.found } - findAll() - return me.found + return findAll() } func findPrivate() { @@ -94,10 +109,12 @@ func findDirty() *gitpb.Repos { return found } -func findAll() { +func findAll() *gitpb.Repos { + found := gitpb.NewRepos() for repo := range me.forge.Repos.IterByFullPath() { - me.found.AppendByGoPath(repo) + found.AppendByGoPath(repo) } + return found } func findUser() { |
