github-vet / github-vet/rangeloop-pointer-findings
IBM-Cloud/go-etcd-rules: rules/int_crawler.go; 11 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [IBM-Cloud/go-etcd-rules](https://www.github.com/IBM-Cloud/go-etcd-rules) at [rules/int_crawler.go](https://github.com/IBM-Cloud/go-etcd-rules/blob/d8350d96d2b6f6123b61ea5af0dcbd9812cf4fc1/rules/int_crawler.go#L169-L179)
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.
> function call at line 176 may store a reference to v
[Click here to see the code in its original context.](https://github.com/IBM-Cloud/go-etcd-rules/blob/d8350d96d2b6f6123b61ea5af0dcbd9812cf4fc1/rules/int_crawler.go#L169-L179)
Click here to show the 11 line(s) of Go which triggered the analyzer.
```go
for k, v := range values {
if ic.isStopping() {
return
}
// Check to see if any rule is satisfied from cache
if ic.kp.isWork(k, &v, api) {
// Process key if it is
ic.kp.processKey(k, &v, ic.api, logger, map[string]string{"source": "crawler"}, ic.incRuleProcessedCount)
}
time.Sleep(time.Duration(ic.delay) * time.Millisecond)
}
```
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: d8350d96d2b6f6123b61ea5af0dcbd9812cf4fc1
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.