github-vet / github-vet/rangeloop-pointer-findings
mindreframer/golang-devops-stuff: src/github.com/globocom/tsuru/provision/docker/actions.go; 6 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [mindreframer/golang-devops-stuff](https://www.github.com/mindreframer/golang-devops-stuff) at [src/github.com/globocom/tsuru/provision/docker/actions.go](https://github.com/mindreframer/golang-devops-stuff/blob/bb6c6c16ff0ae7892cd0ed0715b8a6b769052f9f/src/github.com/globocom/tsuru/provision/docker/actions.go#L158-L163)
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 cont was used in a composite literal at line 159
[Click here to see the code in its original context.](https://github.com/mindreframer/golang-devops-stuff/blob/bb6c6c16ff0ae7892cd0ed0715b8a6b769052f9f/src/github.com/globocom/tsuru/provision/docker/actions.go#L158-L163)
Click here to show the 6 line(s) of Go which triggered the analyzer.
```go
for _, cont := range containers {
err := removeContainer(&cont)
if err != nil {
log.Errorf("Error removing added container %s: %s", cont.ID, err.Error())
}
}
```
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: bb6c6c16ff0ae7892cd0ed0715b8a6b769052f9f
Contributor guide
No contributing guide indexed for this repository
Research direction
Read src/github.com/globocom/tsuru/provision/docker/actions.go at lines 158-163 and compare the analyzer message with the surrounding container-removal logic. The issue is complete when the finding is classified as Bug, Mitigated, or Desirable Behavior using the requested reaction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100