summaryrefslogtreecommitdiff
path: root/flags.go
diff options
context:
space:
mode:
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)