From fc17dc394aedbc5fd636676202bad40c1f98c1de Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 14 Oct 2025 00:15:41 -0500 Subject: implement application specific Config files (and Verbose()) --- verbose.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 verbose.go (limited to 'verbose.go') 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 +} -- cgit v1.2.3