improve boolean logic

This commit is contained in:
bartfokker
2018-10-25 22:12:17 +02:00
parent 6bee1b7f31
commit 4d48245d7d
2 changed files with 2 additions and 2 deletions

View File

@@ -61,7 +61,7 @@ func UpdateSwitch(k string, val bool) {
// Toggle a boolean switch
func Toggle(k string) {
sw := GetSwitch(k)
newVal := sw.Val != true
newVal := !sw.Val
log.Noticef("config change: %s: %t -> %t", k, sw.Val, newVal)
sw.Val = newVal
//log.Errorf("ignoring toggle for non-existant switch: %s", k)