diff options
Diffstat (limited to 'findConfig.go')
| -rw-r--r-- | findConfig.go | 46 |
1 files changed, 8 insertions, 38 deletions
diff --git a/findConfig.go b/findConfig.go index 34c8f18..efe6ee2 100644 --- a/findConfig.go +++ b/findConfig.go @@ -2,52 +2,22 @@ package main import "go.wit.com/log" -func findPrivate() { - repos := me.forge.Repos.SortByGoPath() - for repos.Scan() { - repo := repos.Next() - if me.forge.Config.IsPrivate(repo.GoPath) { - me.found.AppendUniqueGoPath(repo) - } - } -} - -// finds repos that are writable -func findMine() { - log.Printf("get mine %s\n", me.forge.GetGoSrc()) - repos := me.forge.Repos.SortByGoPath() - for repos.Scan() { - repo := repos.Next() - if me.forge.Config.IsWritable(repo.GoPath) { - me.found.AppendUniqueGoPath(repo) - } - } -} - -// finds repos that are writable -func findFavorites() { - log.Printf("get mine %s\n", me.forge.GetGoSrc()) - repos := me.forge.Repos.SortByGoPath() - for repos.Scan() { - repo := repos.Next() - if me.forge.Config.IsFavorite(repo.GoPath) { - me.found.AppendUniqueGoPath(repo) - } - } -} - // retuns true if nothing was done func findConfig() bool { + var done bool = false if argv.FindMine { findConfigMine() - return false + done = true } if argv.FindAll { findConfigAll() - return false + done = true } - - return true + if !done { + findConfigAll() + done = true + } + return done } // finds config repos that are writable |
