summaryrefslogtreecommitdiff
path: root/findRepos.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-05 12:29:47 -0600
committerJeff Carr <[email protected]>2024-12-05 12:29:47 -0600
commit816760d1372d6d1922a9916f3150e49f3fd562cd (patch)
tree0889b24fabb5d35dc0db53d0bbf71a985427c89b /findRepos.go
parent0463030e80f480f0d38989f4231db8b1651b40bc (diff)
developing on this now
Diffstat (limited to 'findRepos.go')
-rw-r--r--findRepos.go40
1 files changed, 40 insertions, 0 deletions
diff --git a/findRepos.go b/findRepos.go
new file mode 100644
index 0000000..1463d09
--- /dev/null
+++ b/findRepos.go
@@ -0,0 +1,40 @@
+package main
+
+import (
+ "go.wit.com/log"
+)
+
+func findRepos() {
+ if argv.FindAll {
+ var configsave bool
+ repos := me.forge.Repos.SortByGoPath()
+ for repos.Scan() {
+ repo := repos.Next()
+ if me.forge.Config.IsReadOnly(repo.GoPath) && !argv.FindReadOnly {
+ if repo.ReadOnly {
+ continue
+ }
+ log.Info("todo: ConfigSave() readonly flag on repo is wrong", repo.GoPath)
+ repo.ReadOnly = true
+ configsave = true
+ continue
+ }
+ me.found.AppendUniqueGoPath(repo)
+ }
+ if configsave {
+ log.Info("should ConfigSave here")
+ me.forge.Repos.ConfigSave()
+ }
+ }
+
+ if argv.FindPrivate {
+ findPrivate()
+ }
+
+ if argv.FindMine {
+ findMine()
+ }
+ if argv.FindFavorites {
+ findFavorites()
+ }
+}