diff options
| author | Jeff Carr <[email protected]> | 2025-10-21 06:41:28 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-21 06:41:28 -0500 |
| commit | 5036409ef63bc4bf9b63d7dd0cf06cdcb2285ab9 (patch) | |
| tree | 725760124ab53cc1475fe0b4ca5fa0a62078a209 /verbose.go | |
| parent | 93a56f29dbf3bcceb3a58d59bc996845b762cb31 (diff) | |
use lib/ENV
Diffstat (limited to 'verbose.go')
| -rw-r--r-- | verbose.go | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/verbose.go b/verbose.go deleted file mode 100644 index 438475a..0000000 --- a/verbose.go +++ /dev/null @@ -1,55 +0,0 @@ -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 { - // Verbose isn't in the config. do nothing here - } else { - // return what the config file has - // fmt.Println("returning from the config:" + found.Value) - 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 -} - -func If(key string) bool { - // always use the config file value first - if configPB != nil { - found := configPB.findByKey(key) - if found == nil { - // Verbose isn't in the config. do nothing here - } else { - // return what the config file has - // fmt.Println("returning from the config:" + found.Value) - if found.Value == "true" { - return true - } - return false - } - } - - // nothing in the config file. check argv - // todo: turn key to lowercase and check here - for _, v := range argv { - if v == "--verbose" { - return true - } - } - return false -} |
