Removed warnings from go staticcheck

This commit is contained in:
gezimbll
2023-11-03 12:20:48 -04:00
committed by Dan Christian Bogos
parent 529430bd4d
commit c2dacc42c1
97 changed files with 334 additions and 761 deletions

View File

@@ -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)