github-vet / github-vet/rangeloop-pointer-findings
vetcher/easystarter: client.go; 16 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [vetcher/easystarter](https://www.github.com/vetcher/easystarter) at [client.go](https://github.com/vetcher/easystarter/blob/012c90527f5fe2225f0bbe785cd9859b410157fa/client.go#L67-L82)
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.
> range-loop variable sig used in defer or goroutine at line 80
[Click here to see the code in its original context.](https://github.com/vetcher/easystarter/blob/012c90527f5fe2225f0bbe785cd9859b410157fa/client.go#L67-L82)
Click here to show the 16 line(s) of Go which triggered the analyzer.
```go
for sig := range sigChan {
if isTerminating {
os.Exit(2)
}
go func() {
isTerminating = true
glg.Print("Stop all services")
_ = stopCommand.Validate("-all")
err := stopCommand.Exec()
if err != nil {
glg.Error(err)
}
glg.Print("Terminate")
os.Exit(int(sig.(syscall.Signal)))
}()
}
```
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: 012c90527f5fe2225f0bbe785cd9859b410157fa
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.