github-vet / github-vet/rangeloop-pointer-findings
kidstuff/mtoy: mgoauth/mgoauth.go; 3 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [kidstuff/mtoy](https://www.github.com/kidstuff/mtoy) at [mgoauth/mgoauth.go](https://github.com/kidstuff/mtoy/blob/d3bfe8bacc40d7d67eed5c6d16fc5c2c0566428f/mgoauth/mgoauth.go#L314-L316)
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 acc is reassigned at line 315
[Click here to see the code in its original context.](https://github.com/kidstuff/mtoy/blob/d3bfe8bacc40d7d67eed5c6d16fc5c2c0566428f/mgoauth/mgoauth.go#L314-L316)
Click here to show the 3 line(s) of Go which triggered the analyzer.
```go
for idx, acc := range accounts {
userLst[idx] = &acc
}
```
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: d3bfe8bacc40d7d67eed5c6d16fc5c2c0566428f
Contributor guide
No contributing guide indexed for this repository
Research direction
Inspect the linked mgoauth/mgoauth.go snippet at lines 314-316 and read the repository's classification guidance for range-loop pointer findings. Determine whether the reported reference reassignment is a bug, mitigated, or desirable behavior, then record the appropriate classification for this finding.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100