github-vet / github-vet/rangeloop-pointer-findings
tsmith-rv/easycontainers: localstack.go; 30 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [tsmith-rv/easycontainers](https://www.github.com/tsmith-rv/easycontainers) at [localstack.go](https://github.com/tsmith-rv/easycontainers/blob/4105982cce9c29cbae05f29ab4a976a2310503d0/localstack.go#L393-L422)
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.
> range-loop variable s used in defer or goroutine at line 412
[Click here to see the code in its original context.](https://github.com/tsmith-rv/easycontainers/blob/4105982cce9c29cbae05f29ab4a976a2310503d0/localstack.go#L393-L422)
Click here to show the 30 line(s) of Go which triggered the analyzer.
```go
for _, s := range l.Services {
if _, exists := initializations[s]; !exists {
continue
}
wg.Add(1)
go func() {
defer wg.Done()
err := dockerExec(
ctx,
dockerClient,
resp.ID,
[]string{
"/bin/bash",
"-c",
fmt.Sprintf(
"until (aws --region us-east-1 --endpoint-url=http://localhost:%d %s) do echo 'waiting for localstack - %s to be up'; sleep 1; done",
ports[s],
initializations[s],
s,
),
},
)
if err != nil {
errs <- err
}
}()
}
```
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: 4105982cce9c29cbae05f29ab4a976a2310503d0
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.