mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Removed warnings from go staticcheck
This commit is contained in:
committed by
Dan Christian Bogos
parent
529430bd4d
commit
c2dacc42c1
@@ -86,9 +86,7 @@ func (sm StringMap) Slice() []string {
|
||||
}
|
||||
|
||||
func (sm StringMap) IsEmpty() bool {
|
||||
return sm == nil ||
|
||||
len(sm) == 0 ||
|
||||
sm[MetaAny]
|
||||
return len(sm) == 0 || sm[MetaAny]
|
||||
}
|
||||
|
||||
func StringMapFromSlice(s []string) StringMap {
|
||||
@@ -273,7 +271,7 @@ func (fWp FlagsWithParams) GetBool(key string) (b bool) {
|
||||
if v, b = fWp[key]; !b {
|
||||
return // not present means false
|
||||
}
|
||||
if v == nil || len(v) == 0 {
|
||||
if len(v) == 0 {
|
||||
return true // empty map
|
||||
}
|
||||
return v.Has(TrueStr) || !v.Has(FalseStr)
|
||||
|
||||
Reference in New Issue
Block a user