github-vet / github-vet/rangeloop-pointer-findings
justone/dockviz: images.go; 15 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [justone/dockviz](https://www.github.com/justone/dockviz) at [images.go](https://github.com/justone/dockviz/blob/15f77275c4f7e459eb7d9f824b5908c165cd0ba4/images.go#L257-L271)
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 image is reassigned at line 267
[Click here to see the code in its original context.](https://github.com/justone/dockviz/blob/15f77275c4f7e459eb7d9f824b5908c165cd0ba4/images.go#L257-L271)
Click here to show the 15 line(s) of Go which triggered the analyzer.
```go
for _, image := range *images {
// find by image id
if strings.Index(image.Id, startImageArg) == 0 {
startImage = &image
break IMAGES
}
// find by image name (name and tag)
for _, repotag := range image.RepoTags {
if repotag == startImageRepo {
startImage = &image
break IMAGES
}
}
}
```
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: 15f77275c4f7e459eb7d9f824b5908c165cd0ba4
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.