github-vet / github-vet/rangeloop-pointer-findings
haoweizh/hello: carry/DBHandler.go; 18 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [haoweizh/hello](https://www.github.com/haoweizh/hello) at [carry/DBHandler.go](https://github.com/haoweizh/hello/blob/dd226a4a5c01c55b8db85b6f312c53bdca8c5fc1/carry/DBHandler.go#L151-L168)
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.
>
[Click here to see the code in its original context.](https://github.com/haoweizh/hello/blob/dd226a4a5c01c55b8db85b6f312c53bdca8c5fc1/carry/DBHandler.go#L151-L168)
Click here to show the 18 line(s) of Go which triggered the analyzer.
```go
for _, value := range orders {
order := api.QueryOrderById(key, secret, value.Market, value.Symbol, value.Instrument,
value.OrderType, value.OrderId)
if order == nil {
continue
}
value.Fee = order.Fee
value.FeeIncome = order.FeeIncome
value.DealAmount = order.DealAmount
if order.Status != `` {
value.Status = order.Status
}
value.DealPrice = order.DealPrice
model.AppDB.Save(&value)
util.Info(fmt.Sprintf(`save order %s %s %s %s`,
value.Symbol, value.OrderSide, value.OrderTime.String(), value.Status))
time.Sleep(time.Second)
}
```
Click here to show extra information the analyzer produced.
```
No path was found through the callgraph that could lead to a function which writes a pointer argument.
No path was found through the callgraph that could lead to a function which passes a pointer to third-party code.
root signature {Save 1} was not found in the callgraph; reference was passed directly to third-party code
```
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: dd226a4a5c01c55b8db85b6f312c53bdca8c5fc1
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.