github-vet / github-vet/rangeloop-pointer-findings
analytics-ufcg/dataset-zonaseleitorais: src/geocoder/main.go; 13 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [analytics-ufcg/dataset-zonaseleitorais](https://www.github.com/analytics-ufcg/dataset-zonaseleitorais) at [src/geocoder/main.go](https://github.com/analytics-ufcg/dataset-zonaseleitorais/blob/9aa372a3f349fd4fb0f5ef68cc85c1650f7d88e1/src/geocoder/main.go#L118-L130)
Below is the message reported by the analyzer for this snippet of code. Beware that the analyzer only reports the first issue it finds, so please do not limit your consideration to the contents of the below message.
> reference to v is reassigned at line 123
[Click here to see the code in its original context.](https://github.com/analytics-ufcg/dataset-zonaseleitorais/blob/9aa372a3f349fd4fb0f5ef68cc85c1650f7d88e1/src/geocoder/main.go#L118-L130)
Click here to show the 13 line(s) of Go which triggered the analyzer.
```go
for _, v := range resp {
for _, t := range v.Types {
// TODO: rank the options based on type (from more to less specific).
// Deliberate choose not to fall into city or country types. Better to not have it at all.
if t == "postal_code" || t == "school" || t == "administrative_area_level_2" || t == "local_government_office" || t == "locality" || t == "point_of_interest" || t == "route" {
r = &v
break
}
}
if r != nil {
break
}
}
```
Leave a reaction on this issue to contribute to the project by classifying this instance as a **Bug** :-1:, **Mitigated** :+1:, or **Desirable Behavior** :rocket:
See the descriptions of the classifications [here](https://github.com/github-vet/rangeclosure-findings#how-can-i-help) for more information.
commit ID: 9aa372a3f349fd4fb0f5ef68cc85c1650f7d88e1
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.