github-vet / github-vet/rangeloop-pointer-findings
kubernetes/minikube: cmd/minikube/cmd/start.go; 25 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [kubernetes/minikube](https://www.github.com/kubernetes/minikube) at [cmd/minikube/cmd/start.go](https://github.com/kubernetes/minikube/blob/81460f05f18b068fda88e3da607741905aeb6b1c/cmd/minikube/cmd/start.go#L491-L515)
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 n was used in a composite literal at line 499
[Click here to see the code in its original context.](https://github.com/kubernetes/minikube/blob/81460f05f18b068fda88e3da607741905aeb6b1c/cmd/minikube/cmd/start.go#L491-L515)
Click here to show the 25 line(s) of Go which triggered the analyzer.
```go
for _, n := range cc.Nodes {
r, p, m, h, err := node.Provision(&cc, &n, n.ControlPlane, false)
s := node.Starter{
Runner: r,
PreExists: p,
MachineAPI: m,
Host: h,
Cfg: &cc,
Node: &n,
ExistingAddons: existingAddons,
}
if err != nil {
// Ok we failed again, let's bail
return nil, err
}
k, err := node.Start(s, n.ControlPlane)
if n.ControlPlane {
kubeconfig = k
}
if err != nil {
// Ok we failed again, let's bail
return nil, 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: 81460f05f18b068fda88e3da607741905aeb6b1c
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.