nil
check around loop SCC-S1031When using range
on nil slices and maps, the loop will never execute,
as the length of the iterable will be regarded as zero. This makes an additional
nil
check around the loop unnecessary.
if s != nil {
for _, x := range s {
// ...
}
}
for _, x := range s {
// ...
}