github-vet / github-vet/rangeloop-pointer-findings
datastax/cassandra-data-apis: db/mocks.go; 3 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [datastax/cassandra-data-apis](https://www.github.com/datastax/cassandra-data-apis) at [db/mocks.go](https://github.com/datastax/cassandra-data-apis/blob/0f24c6a5f6ca28c0086c49ad0ce2997994e7f841/db/mocks.go#L127-L129)
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 value was used in a composite literal at line 128
[Click here to see the code in its original context.](https://github.com/datastax/cassandra-data-apis/blob/0f24c6a5f6ca28c0086c49ad0ce2997994e7f841/db/mocks.go#L127-L129)
Click here to show the 3 line(s) of Go which triggered the analyzer.
```go
for _, value := range views {
values = append(values, map[string]interface{}{"view_name": &value})
}
```
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: 0f24c6a5f6ca28c0086c49ad0ce2997994e7f841
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading db/mocks.go at lines 127-129 and inspect how the range variable is referenced in the constructed map. Determine whether the analyzer finding changes the intended view values; done means the finding is addressed or documented with the behavior verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100