summaryrefslogtreecommitdiff
path: root/findConfig.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-06 19:16:00 -0600
committerJeff Carr <[email protected]>2025-01-06 19:16:00 -0600
commit2ffc60a5d4be1864d931082522bcf5c76431b090 (patch)
tree3722e204b47d6d6ee94edf824004d20506415d15 /findConfig.go
parent4d1d02cc1a33d70d66acd6de97e568c402c7824d (diff)
cleaner code
Diffstat (limited to 'findConfig.go')
-rw-r--r--findConfig.go54
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
- }
- }
-}