From 1a255bdbf64f2cb0f87e532bed82cce42f77a741 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 21 Feb 2025 18:31:26 -0600 Subject: start deprecating me.found --- find.go | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'find.go') diff --git a/find.go b/find.go index 493e3cc..1173be4 100644 --- a/find.go +++ b/find.go @@ -14,43 +14,43 @@ import ( // // by default, it adds every repo -func (f *FindCmd) findRepos() { +func (f *FindCmd) findRepos() *gitpb.Repos { if f == nil { findMine() - return + return me.found } if f.All { findAll() - return + return me.found } if f.Private { findPrivate() - return + return me.found } if f.Mine { findMine() - return + return me.found } if f.Favorites { findFavorites() - return + return me.found } if f.Dirty { - findDirty() - return + return findDirty() } if f.User { findUser() - return + return me.found } findAll() + return me.found } func findPrivate() { @@ -89,15 +89,17 @@ func findFavorites() { } // finds repos that git is reporting as dirty -func findDirty() { +func findDirty() *gitpb.Repos { + found := gitpb.NewRepos() all := me.forge.Repos.SortByFullPath() for all.Scan() { var repo *gitpb.Repo repo = all.Next() if repo.IsDirty() { - me.found.AppendByGoPath(repo) + found.AppendByGoPath(repo) } } + return found } func findAll() { -- cgit v1.2.3