github-vet / github-vet/rangeloop-pointer-findings
glassechidna/pstore: pkg/pstore/common.go; 31 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [glassechidna/pstore](https://www.github.com/glassechidna/pstore) at [pkg/pstore/common.go](https://github.com/glassechidna/pstore/blob/aafa4546d26e2f39e7b41ed12cf2eb0c4d22c757/pkg/pstore/common.go#L116-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 paramName was used in a composite literal at line 119
[Click here to see the code in its original context.](https://github.com/glassechidna/pstore/blob/aafa4546d26e2f39e7b41ed12cf2eb0c4d22c757/pkg/pstore/common.go#L116-L146)
Click here to show the 31 line(s) of Go which triggered the analyzer.
```go
for envName, paramName := range input {
requestID := ""
input := &ssm.GetParameterInput{Name: ¶mName, WithDecryption: aws.Bool(true)}
resp, err := api2.GetParameterWithContext(context.Background(), input, func(r *request.Request) {
r.Handlers.Complete.PushBack(func(req *request.Request) {
requestID = req.RequestID
})
})
if err == nil {
result := ParamResult{
ParamName: paramName,
EnvName: envName,
Value: *resp.Parameter.Value,
RequestID: requestID,
Success: true,
Err: nil,
}
results = append(results, result)
} else {
result := ParamResult{
ParamName: paramName,
EnvName: envName,
RequestID: requestID,
Success: false,
Err: err,
}
results = append(results, result)
}
}
```
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: aafa4546d26e2f39e7b41ed12cf2eb0c4d22c757
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.