diff options
Diffstat (limited to 'findRepos.go')
| -rw-r--r-- | findRepos.go | 40 |
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() + } +} |
