From f793a05288247ac6af1d44fbc3d843b408d51596 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 5 Feb 2025 06:28:51 -0600 Subject: switch to Disabled() --- flags.go | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'flags.go') 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 } /* -- cgit v1.2.3