diff options
| author | Jeff Carr <[email protected]> | 2025-02-05 06:28:51 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-05 06:28:51 -0600 |
| commit | f793a05288247ac6af1d44fbc3d843b408d51596 (patch) | |
| tree | 51972db1c0d1794f15eaa885d45aa3bc52e80769 /flags.go | |
| parent | 1631c72f706e7ffcb14f9682a2f8c0a87c22fcac (diff) | |
switch to Disabled()
Diffstat (limited to 'flags.go')
| -rw-r--r-- | flags.go | 18 |
1 files changed, 5 insertions, 13 deletions
@@ -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 } /* |
