summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-05 07:25:08 -0600
committerJeff Carr <[email protected]>2025-02-05 07:25:08 -0600
commitc1c1b8a75e9f11850882ea9199b7b3d4c35c83bc (patch)
tree37d44961ef53d4374dfa6e811c96ae016e2564eb
parentf793a05288247ac6af1d44fbc3d843b408d51596 (diff)
also add Enable()
-rw-r--r--flags.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/flags.go b/flags.go
index a93b74a..78d8b5e 100644
--- a/flags.go
+++ b/flags.go
@@ -151,6 +151,15 @@ func (f *LogFlag) Disabled() bool {
return ! f.b
}
+// just the opposite of Disabled()
+// both are here just for code readability
+func (f *LogFlag) Enabled() bool {
+ if !f.Ok() {
+ return false
+ }
+ return f.b
+}
+
/*
func (f *LogFlag) Set(b bool) {
if ! f.Ok() {}