Translated to Go.
Comparing to zero in the if statement leads to unnecessary adding zero to the sum. Should be
if n > 0 { sum += n }
Loading collection data...
Translated to Go.
Comparing to zero in the if statement leads to unnecessary adding zero to the sum. Should be
if n > 0 {
sum += n
}