github-vet / github-vet/rangeloop-pointer-findings
habx/aws-mq-cleaner: commands/sns/command.go; 10 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [habx/aws-mq-cleaner](https://www.github.com/habx/aws-mq-cleaner) at [commands/sns/command.go](https://github.com/habx/aws-mq-cleaner/blob/823616828f5b22663d19ba9a93743aec476cccf3/commands/sns/command.go#L211-L220)
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 topicARN was used in a composite literal at line 213
[Click here to see the code in its original context.](https://github.com/habx/aws-mq-cleaner/blob/823616828f5b22663d19ba9a93743aec476cccf3/commands/sns/command.go#L211-L220)
Click here to show the 10 line(s) of Go which triggered the analyzer.
```go
for topicARN := range topics {
l.Sugar().Debug("SNS: delete ", topicARN)
_, err := snsSvc.DeleteTopic(&sns.DeleteTopicInput{TopicArn: &topicARN})
m[topicARN] = []string{*snsTopicARNToTopicName(&topicARN), func(err error) string {
if err != nil {
return err.Error()
}
return "OK"
}(err)}
}
```
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: 823616828f5b22663d19ba9a93743aec476cccf3
Contributor guide
No contributing guide indexed for this repository
Research direction
Read commands/sns/command.go around lines 211-220 and inspect how the range variable topicARN is referenced in the DeleteTopicInput and helper call. Check the repository's Go version and related range-loop guidance, then determine whether this is an actual bug, mitigated behavior, or desirable behavior as requested by the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, go
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100