github-vet / github-vet/rangeloop-pointer-findings
ajanata/pyx-irc: irc/commands.go; 16 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [ajanata/pyx-irc](https://www.github.com/ajanata/pyx-irc) at [irc/commands.go](https://github.com/ajanata/pyx-irc/blob/b0477be2b963b85c9306eeac676c2116058ba43c/irc/commands.go#L759-L774)
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 game was used in a composite literal at line 762
[Click here to see the code in its original context.](https://github.com/ajanata/pyx-irc/blob/b0477be2b963b85c9306eeac676c2116058ba43c/irc/commands.go#L759-L774)
Click here to show the 16 line(s) of Go which triggered the analyzer.
```go
for _, game := range resp.Games {
info := ChannelInfo{
name: client.config.GameChannelPrefix + strconv.Itoa(game.Id),
totalUsers: totalUserCount(&game),
topic: makeGameTopic(&game),
}
games = append(games, info)
if game.GameOptions.SpectatorLimit > 0 {
info = ChannelInfo{
name: client.config.SpectateGameChannelPrefix + strconv.Itoa(game.Id),
totalUsers: totalUserCount(&game),
topic: "SPECTATE: " + makeGameTopic(&game),
}
games = append(games, info)
}
}
```
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: b0477be2b963b85c9306eeac676c2116058ba43c
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.