github-vet / github-vet/rangeloop-pointer-findings
Juniper/contrail-kubernetes: pkg/network/opencontrail/consistency.go; 9 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [Juniper/contrail-kubernetes](https://www.github.com/Juniper/contrail-kubernetes) at [pkg/network/opencontrail/consistency.go](https://github.com/Juniper/contrail-kubernetes/blob/814f54797796cc6c1351a5c7afea0201bb693e33/pkg/network/opencontrail/consistency.go#L306-L314)
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 svc was used in a composite literal at line 308
[Click here to see the code in its original context.](https://github.com/Juniper/contrail-kubernetes/blob/814f54797796cc6c1351a5c7afea0201bb693e33/pkg/network/opencontrail/consistency.go#L306-L314)
Click here to show the 9 line(s) of Go which triggered the analyzer.
```go
for _, svc := range serviceList.Items {
fqn := []string{c.config.DefaultDomain, svc.Namespace, fmt.Sprintf(ServiceNetworkFmt,
c.serviceMgr.GetServiceName(&svc))}
networkName := strings.Join(fqn, ":")
if _, ok := serviceNetworkMap[networkName]; !ok {
serviceNetworkMap[networkName] = true
*kubeNetworks = append(*kubeNetworks, networkName)
}
}
```
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: 814f54797796cc6c1351a5c7afea0201bb693e33
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.