Code is iterating, grabbing the wanted value, then breaking:
for n, res := range r.Moq.ResultsByParams_XXX {
if res.AnyParams == r.AnyParams {
results = &res
break
}
if res.AnyCount > anyCount {
insertAt = n
}
}
Could use the index to avoid the linter issue:
for n, res := range r.Moq.ResultsByParams_XXX {
if res.AnyParams == r.AnyParams {
results = &r.Moq.ResultsByParams_XXX[n]
break
}
if res.AnyCount > anyCount {
insertAt = n
}
}