github-vet / github-vet/rangeloop-pointer-findings
zwdong1994/cockroach-old: pkg/sql/backfill/backfill.go; 9 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [zwdong1994/cockroach-old](https://www.github.com/zwdong1994/cockroach-old) at [pkg/sql/backfill/backfill.go](https://github.com/zwdong1994/cockroach-old/blob/b0652329251811da42582bd405a0ce8f329c962c/pkg/sql/backfill/backfill.go#L149-L157)
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.
> reference to fkTableDesc is reassigned at line 155
[Click here to see the code in its original context.](https://github.com/zwdong1994/cockroach-old/blob/b0652329251811da42582bd405a0ce8f329c962c/pkg/sql/backfill/backfill.go#L149-L157)
Click here to show the 9 line(s) of Go which triggered the analyzer.
```go
for _, fkTableDesc := range otherTables {
found, ok := fkTables[fkTableDesc.ID]
if !ok {
// We got passed an extra table for some reason - just ignore it.
continue
}
found.Table = &fkTableDesc
fkTables[fkTableDesc.ID] = found
}
```
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: b0652329251811da42582bd405a0ce8f329c962c
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.