github-vet / github-vet/preliminary-findings-jan-2021
prizem-io/gateway: server/gateway.go; 7 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Found a possible issue in [prizem-io/gateway](https://www.github.com/prizem-io/gateway) at [server/gateway.go](https://github.com/prizem-io/gateway/blob/09b957f7993ff65265c51d0bebfe0ab5c3a791b8/server/gateway.go#L184-L190)
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 consumer is reassigned at line 189
[Click here to see the code in its original context.](https://github.com/prizem-io/gateway/blob/09b957f7993ff65265c51d0bebfe0ab5c3a791b8/server/gateway.go#L184-L190)
Click here to show the 7 line(s) of Go which triggered the analyzer.
```go
for _, consumer := range gatewayConfig.Consumers {
err := handleConfigurations(consumer.Filters)
if err != nil {
return nil, err
}
gateway.Consumers[consumer.ID] = &consumer
}
```
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: 09b957f7993ff65265c51d0bebfe0ab5c3a791b8
Contributor guide
No contributing guide indexed for this repository
Research direction
Read server/gateway.go at lines 184-190 in commit 09b957f7993ff65265c51d0bebfe0ab5c3a791b8 and review the analyzer message about consumer reassignment. Decide whether the finding 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
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100