summaryrefslogtreecommitdiff
path: root/flags.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-20 14:57:53 -0600
committerJeff Carr <[email protected]>2024-01-20 14:57:53 -0600
commit7371f0428fad167e9a1762e08ac3c1e97901b01a (patch)
tree18382c14c09836de52fc59d64e2e86b966375f79 /flags.go
parentfce5068f04ad3e0b3d51b5aadfd58ddb05e58be8 (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.go18
1 files changed, 10 insertions, 8 deletions
diff --git a/flags.go b/flags.go
index 5ffc679..52a2ac6 100644
--- a/flags.go
+++ b/flags.go
@@ -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)