github-vet / github-vet/rangeloop-pointer-findings
qshuai/cswm: controllers/move.go; 14 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [qshuai/cswm](https://www.github.com/qshuai/cswm) at [controllers/move.go](https://github.com/qshuai/cswm/blob/f52074289ee137963c639e06eb4b8049f4f0a32d/controllers/move.go#L133-L146)
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 item is reassigned at line 136
[Click here to see the code in its original context.](https://github.com/qshuai/cswm/blob/f52074289ee137963c639e06eb4b8049f4f0a32d/controllers/move.go#L133-L146)
Click here to show the 14 line(s) of Go which triggered the analyzer.
```go
for _, item := range pool_user {
if item.PoolName != user.PoolName {
message.From = &user
message.To = &item
message.Content = "" + user.Name + " 将商品: " + product.Title + " 从 " +
store_from.Pool + "-" + store_from.Name + " 移库到 " +
c.GetString("move_to") + "
具体请查看:移库详情"
o.Insert(&message)
msg.IncrOneMessage(item.Username)
}
}
```
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: f52074289ee137963c639e06eb4b8049f4f0a32d
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.