github-vet / github-vet/rangeloop-pointer-findings
Otanikotani/so-influencers: vertices_edges.go; 13 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [Otanikotani/so-influencers](https://www.github.com/Otanikotani/so-influencers) at [vertices_edges.go](https://github.com/Otanikotani/so-influencers/blob/820a3a0a1db861640e3365b8d8c443d8b4bd41c9/vertices_edges.go#L106-L118)
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 question was used in a composite literal at line 109
[Click here to see the code in its original context.](https://github.com/Otanikotani/so-influencers/blob/820a3a0a1db861640e3365b8d8c443d8b4bd41c9/vertices_edges.go#L106-L118)
Click here to show the 13 line(s) of Go which triggered the analyzer.
```go
for _, question := range *questions {
edgeCount++
edgeID := "e" + strconv.Itoa(edgeCount)
askedEdge := []string{edgeID, shallowUserVerticeID(&question.Owner), questionVerticeID(&question), "Asked"}
edges = append(edges, askedEdge)
for _, answer := range question.Answers {
edgeCount++
edgeID := "e" + strconv.Itoa(edgeCount)
answerEdge := []string{edgeID, shallowUserVerticeID(&answer.Owner), answerVerticeID(&answer), "Answered"}
edges = append(edges, answerEdge)
}
}
```
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: 820a3a0a1db861640e3365b8d8c443d8b4bd41c9
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.