github-vet / github-vet/rangeloop-pointer-findings
PaulekOfficial/RocketDiscord: commands/playCommand.go; 17 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [PaulekOfficial/RocketDiscord](https://www.github.com/PaulekOfficial/RocketDiscord) at [commands/playCommand.go](https://github.com/PaulekOfficial/RocketDiscord/blob/6ab67077793feba3bf18e9cb32c2d8aceaba98b0/commands/playCommand.go#L154-L170)
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 format is reassigned at line 164
[Click here to see the code in its original context.](https://github.com/PaulekOfficial/RocketDiscord/blob/6ab67077793feba3bf18e9cb32c2d8aceaba98b0/commands/playCommand.go#L154-L170)
Click here to show the 17 line(s) of Go which triggered the analyzer.
```go
for _, format := range video.Formats {
switch format.ItagNo {
case 43:
case 44:
case 45:
case 46:
case 171:
case 249:
case 250:
case 251:
videoFormat = &format
break
}
if videoFormat != 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: 6ab67077793feba3bf18e9cb32c2d8aceaba98b0
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.