diff options
Diffstat (limited to 'findConfig.go')
| -rw-r--r-- | findConfig.go | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/findConfig.go b/findConfig.go deleted file mode 100644 index 6703adf..0000000 --- a/findConfig.go +++ /dev/null @@ -1,54 +0,0 @@ -package main - -import "go.wit.com/log" - -// retuns true if nothing was done -func findConfig(fargv *FindCmd) { - if fargv == nil { - findConfigAll() - return - } - if fargv.Mine { - findConfigMine() - return - } - if fargv.All { - findConfigAll() - return - } - findConfigAll() -} - -// finds config repos that are writable -func findConfigMine() { - all := me.forge.Config.SortByGoPath() - for all.Scan() { - r := all.Next() - gopath := r.GoPath - if r.GetDirectory() { - continue - } - if me.forge.Config.IsWritable(gopath) { - log.Info("mine:", gopath) - me.foundPaths = append(me.foundPaths, gopath) - continue - } - } -} - -// get everything in your config -func findConfigAll() { - all := me.forge.Config.SortByGoPath() - for all.Scan() { - r := all.Next() - gopath := r.GoPath - if r.GetDirectory() { - continue - } - if me.forge.Config.IsWritable(gopath) { - log.Info("mine:", gopath) - me.foundPaths = append(me.foundPaths, gopath) - continue - } - } -} |
