github-vet / github-vet/rangeloop-pointer-findings
1920853199/bt: main.go; 8 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [1920853199/bt](https://www.github.com/1920853199/bt) at [main.go](https://github.com/1920853199/bt/blob/382bdc9632b4cb1975582e1f2cccae26135f61dc/main.go#L195-L202)
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 v used in defer or goroutine at line 197
[Click here to see the code in its original context.](https://github.com/1920853199/bt/blob/382bdc9632b4cb1975582e1f2cccae26135f61dc/main.go#L195-L202)
Click here to show the 8 line(s) of Go which triggered the analyzer.
```go
for _, v := range dnsName {
go func() {
qtMsg, err = controller.SendDNSReq(v, domain, msgChan)
if err != nil {
fmt.Println("failed to req:", 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: 382bdc9632b4cb1975582e1f2cccae26135f61dc
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.