github-vet / github-vet/rangeloop-pointer-findings
elastisys/kube-insight-logserver: pkg/server/http.go; 8 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [elastisys/kube-insight-logserver](https://www.github.com/elastisys/kube-insight-logserver) at [pkg/server/http.go](https://github.com/elastisys/kube-insight-logserver/blob/3aa983960ec0e117256882450a0ea3a6f4e554a7/pkg/server/http.go#L112-L119)
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 logEntry is reassigned at line 113
[Click here to see the code in its original context.](https://github.com/elastisys/kube-insight-logserver/blob/3aa983960ec0e117256882450a0ea3a6f4e554a7/pkg/server/http.go#L112-L119)
Click here to show the 8 line(s) of Go which triggered the analyzer.
```go
for _, logEntry := range logEntries {
lp := &logEntry
if err := lp.Validate(); err != nil {
s.errorResponse(w, http.StatusBadRequest,
logstore.APIError{Message: "invalid log entry", Detail: err.Error()})
return
}
}
```
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: 3aa983960ec0e117256882450a0ea3a6f4e554a7
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.