both branches in if statement have same body
78 (*result)[index] = colVar
79 } else if colVar, ok = (*colVar2).(float64); ok {
80 (*result)[index] = colVar
81 } else if colVar, ok = (*colVar2).([]uint8); ok {82 (*result)[index] = colVar
83 } else {
84 (*result)[index] = colVar
Description
Identical code is present in more than one branch of the conditional branches. It is recommended to either remove the duplicates or club the conditional cases so that duplication can be reduced.
Bad practice
if x > y {
println("x is greater")
} else {
// But `y >= x` here.
println("x is greater")
}
Recommended
if x > y {
println("x is greater")
} else {
// As `y >= x`, `y is greater` is almost
// correct but `x is greater` was not.
println("y is greater")
}
// As both cases evaluate to same body, then `if-else`
// is not even required.
println("x is greater")