SessionS - processEvent function with sync actions

This commit is contained in:
DanB
2019-11-22 19:51:20 +01:00
parent 18999bcbbd
commit 360a9cc00b
7 changed files with 216 additions and 71 deletions

View File

@@ -288,3 +288,15 @@ func (fWp FlagsWithParams) SliceFlags() (sls []string) {
}
return
}
// GetBool returns the flag as boolean
func (fWp FlagsWithParams) GetBool(key string) (b bool) {
var v interface{}
if _, b = fWp[key]; !b {
return // not present means false
}
if v.(string) != "" && v.(string) != "true" {
return // not empty nor true means false again
}
return true
}