summaryrefslogtreecommitdiff
path: root/verbose.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-14 00:15:41 -0500
committerJeff Carr <[email protected]>2025-10-14 00:15:41 -0500
commitfc17dc394aedbc5fd636676202bad40c1f98c1de (patch)
tree197ff50da15f186c38d50a71fede7b0c160ee57f /verbose.go
parent3b4821a3af62376d675699493e01cd07891ad69c (diff)
implement application specific Config files (and Verbose())
Diffstat (limited to 'verbose.go')
-rw-r--r--verbose.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/verbose.go b/verbose.go
new file mode 100644
index 0000000..4658dcf
--- /dev/null
+++ b/verbose.go
@@ -0,0 +1,26 @@
+package config
+
+// this is an experiment at this point to
+// see how this turns out
+
+func Verbose() bool {
+ // always use the config file value first
+ if configPB != nil {
+ found := configPB.FindByKey("Verbose")
+
+ if found != nil {
+ if found.Value == "true" {
+ return true
+ }
+ return false
+ }
+ }
+
+ // nothing in the config file. check argv
+ for _, v := range argv {
+ if v == "--verbose" {
+ return true
+ }
+ }
+ return false
+}