github-vet / github-vet/rangeloop-pointer-findings
hortonworks/kubernetes-yarn: Godeps/_workspace/src/github.com/hortonworks/gohadoop/hadoop_yarn/yarn_client/am_rm_client.go; 8 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [hortonworks/kubernetes-yarn](https://www.github.com/hortonworks/kubernetes-yarn) at [Godeps/_workspace/src/github.com/hortonworks/gohadoop/hadoop_yarn/yarn_client/am_rm_client.go](https://github.com/hortonworks/kubernetes-yarn/blob/3dbbeeee1f8f344a983f53da98f5eed7cefbe9d1/Godeps/_workspace/src/github.com/hortonworks/gohadoop/hadoop_yarn/yarn_client/am_rm_client.go#L86-L93)
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 host was used in a composite literal at line 91
[Click here to see the code in its original context.](https://github.com/hortonworks/kubernetes-yarn/blob/3dbbeeee1f8f344a983f53da98f5eed7cefbe9d1/Godeps/_workspace/src/github.com/hortonworks/gohadoop/hadoop_yarn/yarn_client/am_rm_client.go#L86-L93)
Click here to show the 8 line(s) of Go which triggered the analyzer.
```go
for host, request := range requests {
log.Println("priority: ", priority)
log.Println("host: ", host)
log.Println("request: ", request)
resourceRequest := hadoop_yarn.ResourceRequestProto{Priority: &hadoop_yarn.PriorityProto{Priority: &priority}, ResourceName: &host, Capability: request.capability, NumContainers: &request.numContainers}
asks = append(asks, &resourceRequest)
}
```
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: 3dbbeeee1f8f344a983f53da98f5eed7cefbe9d1
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.