nil
check on slice SCC-S1009115}
116
117func mapExpr(m NamedArgs) map[string]*expr {
118 if m == nil || len(m) == 0 {119 return nil
120 }
121 res := make(map[string]*expr)
The length of a nil
slice evaluates to zero. Hence, there is no need to check
whether a slice is nil
before calculating its length.
if x != nil && len(x) != 0 {
x[0] = 1
}
if len(x) != 0 {
x[0] = 1
}