github-vet / github-vet/rangeloop-pointer-findings
weibocom/dockerf: machine/machine_proxy.go; 14 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [weibocom/dockerf](https://www.github.com/weibocom/dockerf) at [machine/machine_proxy.go](https://github.com/weibocom/dockerf/blob/f5cc93898678e7de83634bd79291b78180d790b2/machine/machine_proxy.go#L66-L79)
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 name used in defer or goroutine at line 73
[Click here to see the code in its original context.](https://github.com/weibocom/dockerf/blob/f5cc93898678e7de83634bd79291b78180d790b2/machine/machine_proxy.go#L66-L79)
Click here to show the 14 line(s) of Go which triggered the analyzer.
```go
for _, name := range names {
go func(nm string) {
defer wg.Done()
args := []string{"start", nm}
err := mp.Run(args...)
if err != nil {
errs = append(errs, err.Error())
fmt.Printf("Machine(%s) start failed:%s\n", name, err.Error())
} else {
successMachineNames = append(successMachineNames, nm)
fmt.Printf("Machine(%s) Started.\n", nm)
}
}(name)
}
```
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: f5cc93898678e7de83634bd79291b78180d790b2
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.