github-vet / github-vet/rangeloop-pointer-findings
LukeShu/periwinkle: src/httpentity/negotiate/rfc7231_consider.go; 17 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [LukeShu/periwinkle](https://www.github.com/LukeShu/periwinkle) at [src/httpentity/negotiate/rfc7231_consider.go](https://github.com/LukeShu/periwinkle/blob/00f1f15adbdfe1428cd21f342d5915dd88a44228/src/httpentity/negotiate/rfc7231_consider.go#L162-L178)
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 accept is reassigned at line 164
[Click here to see the code in its original context.](https://github.com/LukeShu/periwinkle/blob/00f1f15adbdfe1428cd21f342d5915dd88a44228/src/httpentity/negotiate/rfc7231_consider.go#L162-L178)
Click here to show the 17 line(s) of Go which triggered the analyzer.
```go
for _, accept := range accepts {
if accept.LanguageRange == "*" {
def = &accept
} else {
if languageFilterTag(accept.LanguageRange, language) {
old, alreadyset := precedence[language]
new := uint(strings.Count(string(accept.LanguageRange), "-")) + 1
if !alreadyset || old <= new {
quality[language] = accept.Weight
precedence[language] = new
if max < accept.Weight {
max = accept.Weight
}
}
}
}
}
```
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: 00f1f15adbdfe1428cd21f342d5915dd88a44228
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.