diff options
| author | Jeff Carr <[email protected]> | 2024-01-20 14:57:53 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-20 14:57:53 -0600 |
| commit | 7371f0428fad167e9a1762e08ac3c1e97901b01a (patch) | |
| tree | 18382c14c09836de52fc59d64e2e86b966375f79 /flags.go | |
| parent | fce5068f04ad3e0b3d51b5aadfd58ddb05e58be8 (diff) | |
log flags gui is kinda working nowv0.5.6
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'flags.go')
| -rw-r--r-- | flags.go | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -133,6 +133,13 @@ func ProcessFlags(callback func(*LogFlag)) { } +// probably a better name than Get() +// switch to this +func (f *LogFlag) Bool() 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} @@ -146,13 +153,6 @@ func (f *LogFlag) Set(b bool) { } */ -// probably a better name than Get() -// switch to this -func (f *LogFlag) Bool() bool { - if ! f.Ok() {return false} - return f.b -} - // returns the name of the flag func (f *LogFlag) GetName() string { if ! f.Ok() {return ""} @@ -197,10 +197,12 @@ func NewFlag(name string, b bool, full, short, desc string) *LogFlag { return f } -func (f *LogFlag) Set(b bool) { +func (f *LogFlag) SetBool(b bool) { + /* if ! f.Ok() {return} flagsMutex.Lock() defer flagsMutex.Unlock() + */ Info("Set() ", "(" + f.subsystem + ")", f.name, "=", f.b, ":", f.desc) f.b = b Info("Set() f.b is now", f.b) |
