diff options
| author | Jeff Carr <[email protected]> | 2025-02-05 07:25:08 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-05 07:25:08 -0600 |
| commit | c1c1b8a75e9f11850882ea9199b7b3d4c35c83bc (patch) | |
| tree | 37d44961ef53d4374dfa6e811c96ae016e2564eb /flags.go | |
| parent | f793a05288247ac6af1d44fbc3d843b408d51596 (diff) | |
also add Enable()
Diffstat (limited to 'flags.go')
| -rw-r--r-- | flags.go | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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() {} |
