summaryrefslogtreecommitdiff
path: root/flags.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-05 06:28:51 -0600
committerJeff Carr <[email protected]>2025-02-05 06:28:51 -0600
commitf793a05288247ac6af1d44fbc3d843b408d51596 (patch)
tree51972db1c0d1794f15eaa885d45aa3bc52e80769 /flags.go
parent1631c72f706e7ffcb14f9682a2f8c0a87c22fcac (diff)
switch to Disabled()
Diffstat (limited to 'flags.go')
-rw-r--r--flags.go18
1 files changed, 5 insertions, 13 deletions
diff --git a/flags.go b/flags.go
index ce99aa8..a93b74a 100644
--- a/flags.go
+++ b/flags.go
@@ -142,21 +142,13 @@ func ProcessFlags(callback func(*LogFlag)) {
}
-// probably a better name than Get()
-// switch to this
-func (f *LogFlag) Bool() bool {
+// is the output flag disabled?
+// if so, don't print anything!
+func (f *LogFlag) Disabled() bool {
if !f.Ok() {
- return false
- }
- return f.b
-}
-
-// returns the value of the flag
-func (f *LogFlag) Get() bool {
- if !f.Ok() {
- return false
+ return true
}
- return f.b
+ return ! f.b
}
/*