github-vet / github-vet/rangeloop-pointer-findings
livesense-inc/split_mysql: splmysql/session.go; 7 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [livesense-inc/split_mysql](https://www.github.com/livesense-inc/split_mysql) at [splmysql/session.go](https://github.com/livesense-inc/split_mysql/blob/8858a2722db016044e8d6019abf59a4855ac4c02/splmysql/session.go#L37-L43)
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 tx is reassigned at line 41
[Click here to see the code in its original context.](https://github.com/livesense-inc/split_mysql/blob/8858a2722db016044e8d6019abf59a4855ac4c02/splmysql/session.go#L37-L43)
Click here to show the 7 line(s) of Go which triggered the analyzer.
```go
for _, tx := range sess.transactions {
if !tx.completed || !tx.failed {
continue
}
t := &tx
transactions = append(transactions, *t)
}
```
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: 8858a2722db016044e8d6019abf59a4855ac4c02
Contributor guide
No contributing guide indexed for this repository
Research direction
Review splmysql/session.go at lines 37-43 and compare the analyzer message with the surrounding range-loop behavior. Decide whether the finding is a Bug, Mitigated, or Desirable Behavior, then leave the corresponding reaction on this issue; that classification is the definition of done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100