mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
SessionS - processEvent function with sync actions
This commit is contained in:
12
utils/map.go
12
utils/map.go
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user