github-vet / github-vet/rangeloop-pointer-findings
GopherCoder/FIFA-World-Cup: domain/awards.go; 7 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [GopherCoder/FIFA-World-Cup](https://www.github.com/GopherCoder/FIFA-World-Cup) at [domain/awards.go](https://github.com/GopherCoder/FIFA-World-Cup/blob/ed39abc83e56c6ed35e2f04195b301dbeec41994/domain/awards.go#L36-L42)
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/GopherCoder/FIFA-World-Cup/blob/ed39abc83e56c6ed35e2f04195b301dbeec41994/domain/awards.go#L36-L42)
Click here to show the 7 line(s) of Go which triggered the analyzer.
```go
for _, award := range awards {
fmt.Println(award)
count++
// push data into db
initiator.POSTGRES.Save(&award)
}
```
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: ed39abc83e56c6ed35e2f04195b301dbeec41994
Contributor guide
No contributing guide indexed for this repository
Research direction
Read the referenced lines in domain/awards.go, especially the range over awards and the call to initiator.POSTGRES.Save. Use the analyzer details and the linked code context to decide whether this is a Bug, Mitigated, or Desirable Behavior, then leave the corresponding reaction on the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- databases, devtools
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100