summaryrefslogtreecommitdiff
path: root/findConfig.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-27 04:36:29 -0600
committerJeff Carr <[email protected]>2024-12-27 04:36:29 -0600
commit8b3be0ab42e68ab0616ff6e461dbe8b582b12d21 (patch)
tree12fd1d35cca629fd608a26cc83cd328464cfbc76 /findConfig.go
parent9818e8d1ee685fa11f6ed9745a92e0c31c3a75f1 (diff)
more argv improvementsv0.22.30v0.22.29
Diffstat (limited to 'findConfig.go')
-rw-r--r--findConfig.go25
1 files changed, 11 insertions, 14 deletions
diff --git a/findConfig.go b/findConfig.go
index aba8709..6703adf 100644
--- a/findConfig.go
+++ b/findConfig.go
@@ -3,23 +3,20 @@ package main
import "go.wit.com/log"
// retuns true if nothing was done
-func findConfig() bool {
- var done bool = false
- if argv.Find != nil {
- if argv.Find.Mine {
- findConfigMine()
- done = true
- }
- if argv.Find.All {
- findConfigAll()
- done = true
- }
+func findConfig(fargv *FindCmd) {
+ if fargv == nil {
+ findConfigAll()
+ return
+ }
+ if fargv.Mine {
+ findConfigMine()
+ return
}
- if !done {
+ if fargv.All {
findConfigAll()
- done = true
+ return
}
- return done
+ findConfigAll()
}
// finds config repos that are writable