github-vet / github-vet/rangeloop-pointer-findings
gamedb/gamedb: pkg/tasks/players_update_ranks.go; 15 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [gamedb/gamedb](https://www.github.com/gamedb/gamedb) at [pkg/tasks/players_update_ranks.go](https://github.com/gamedb/gamedb/blob/eaf37e0aff2659bb1c9995f80faac125efa510d7/pkg/tasks/players_update_ranks.go#L71-L85)
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 cc was used in a composite literal at line 77
[Click here to see the code in its original context.](https://github.com/gamedb/gamedb/blob/eaf37e0aff2659bb1c9995f80faac125efa510d7/pkg/tasks/players_update_ranks.go#L71-L85)
Click here to show the 15 line(s) of Go which triggered the analyzer.
```go
for cc, states := range i18n.States {
for state := range states {
for read, write := range mongo.PlayerRankFields {
err = queue.ProducePlayerRank(queue.PlayerRanksMessage{
SortColumn: read,
ObjectKey: string(write) + "_state-" + state,
Country: &cc,
State: &state,
})
if err != nil {
return err
}
}
}
}
```
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: eaf37e0aff2659bb1c9995f80faac125efa510d7
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.