github-vet / github-vet/rangeloop-pointer-findings
nearmap/cvmanager: deploy/simple.go; 10 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [nearmap/cvmanager](https://www.github.com/nearmap/cvmanager) at [deploy/simple.go](https://github.com/nearmap/cvmanager/blob/c6367b93e0ffaa9d5a8cc4c3da74ec05ae444ca4/deploy/simple.go#L47-L56)
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 c is reassigned at line 54
[Click here to see the code in its original context.](https://github.com/nearmap/cvmanager/blob/c6367b93e0ffaa9d5a8cc4c3da74ec05ae444ca4/deploy/simple.go#L47-L56)
Click here to show the 10 line(s) of Go which triggered the analyzer.
```go
for _, c := range podSpec.Containers {
if c.Name == sd.cv.Spec.Container.Name {
if updateErr := sd.target.PatchPodSpec(sd.cv, c, sd.version); updateErr != nil {
glog.V(2).Infof("Failed to update container version: version=%v, target=%v, error=%v",
sd.version, sd.target.Name(), updateErr)
return updateErr
}
container = &c
}
}
```
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: c6367b93e0ffaa9d5a8cc4c3da74ec05ae444ca4
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.