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 i used in defer or goroutine at line 90
Click here to show the 12 line(s) of Go which triggered the analyzer.
```go
for i, d := range ct.dd {
go func() {
if i >= ct.cancelCount {
<-ct.sync
cancel()
time.Sleep(time.Second)
ct.sync <- true
return
}
}()
ct.msgs <- d
}
```
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 for more information.
Found a possible issue in corvus-ch/rabbitmq-cli-consumer at consumer/consumer_consume_test.go
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.
Click here to see the code in its original context.
Click here to show the 12 line(s) of Go which triggered the analyzer.
```go for i, d := range ct.dd { go func() { if i >= ct.cancelCount { <-ct.sync cancel() time.Sleep(time.Second) ct.sync <- true return } }() ct.msgs <- d } ```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 for more information.
commit ID: d1f23fe1ac3c07742eb110b30007b2741102b8cb