No check for unnecessary nil
check on a map followed by a len
check of the same map
#1527
Labels
nil
check on a map followed by a len
check of the same map
#1527
Considering staticcheck identifies unnecessary nil checks for slices followed by a
len
check, I am surprised it doesn’t seem to do the same for maps.I was just reviewing some code that is essentially:
I was expecting staticcheck to flag the o.m != nil part as unnecessary, but it isn’t.
The text was updated successfully, but these errors were encountered: