summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-07-01 18:36:48 -0500
committerJeff Carr <[email protected]>2025-07-01 18:36:48 -0500
commitd962ff8db05a50f9110e9ccbdce7bfd9064d6dac (patch)
tree318c3d27a294560fe1c89bd02ed415554cc36036
parentd2a0aa3098e48d32f41abf0a90340543775366d7 (diff)
deprecate me.found
-rw-r--r--argvAutoshell.go2
-rw-r--r--find.go16
2 files changed, 10 insertions, 8 deletions
diff --git a/argvAutoshell.go b/argvAutoshell.go
index 511c330..823e4be 100644
--- a/argvAutoshell.go
+++ b/argvAutoshell.go
@@ -47,6 +47,8 @@ func (args) doBashAuto() {
fmt.Println("--full")
case "pull":
fmt.Println("list --force")
+ case "--find":
+ fmt.Println("foo bar")
case "patch":
fmt.Println("get list --submit show")
case "user":
diff --git a/find.go b/find.go
index 361541f..c32a116 100644
--- a/find.go
+++ b/find.go
@@ -20,8 +20,7 @@ func doFind() *gitpb.Repos {
}
if argv.List.Mine {
- findMine()
- return me.found
+ return findMine()
}
if argv.List.Dirty {
@@ -33,8 +32,7 @@ func doFind() *gitpb.Repos {
func (f *FindCmd) findRepos() *gitpb.Repos {
if f == nil {
- findMine()
- return me.found
+ return findMine()
}
if f.All {
@@ -47,8 +45,7 @@ func (f *FindCmd) findRepos() *gitpb.Repos {
}
if f.Mine {
- findMine()
- return me.found
+ return findMine()
}
if f.Favorites {
@@ -77,14 +74,17 @@ func findPrivate() {
}
// finds repos that are writable
-func findMine() {
+func findMine() *gitpb.Repos {
+ found := gitpb.NewRepos()
+
// log.Printf("get mine %s\n", me.forge.GetGoSrc())
for repo := range me.forge.Repos.IterByFullPath() {
if me.forge.Config.IsWritable(repo.GetGoPath()) {
- me.found.AppendByGoPath(repo)
+ found.AppendByGoPath(repo)
}
}
+ return found
}
// finds repos the user has marked as favorites in the forge .config