github-vet / github-vet/rangeloop-pointer-findings
stephenafamo/ci-bot: processors.go; 41 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [stephenafamo/ci-bot](https://www.github.com/stephenafamo/ci-bot) at [processors.go](https://github.com/stephenafamo/ci-bot/blob/4a44b0bc3cf2d6701eb158d1ca5443b0314c58fa/processors.go#L25-L65)
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 build used in defer or goroutine at line 28
[Click here to see the code in its original context.](https://github.com/stephenafamo/ci-bot/blob/4a44b0bc3cf2d6701eb158d1ca5443b0314c58fa/processors.go#L25-L65)
Click here to show the 41 line(s) of Go which triggered the analyzer.
```go
for build := range s.Builds {
go func() {
ts, attemptErr := sendAttemptDeployMessage(build)
if attemptErr != nil {
log.Println(attemptErr)
return
}
url, deployErr := deploy(build)
if deployErr != nil {
log.Println(deployErr)
failErr := sendFailedDeployMessage(build, ts, deployErr)
if failErr != nil {
log.Println(failErr)
}
return
}
err := sendDeploySuccessMessage(build, ts, url)
if err != nil {
log.Println(err)
return
}
payload, errs := sendOwnerMessages(build, url)
if len(errs) > 0 {
log.Println(errs)
return
}
errs = sendQaMessages(build, url, payload)
if len(errs) > 0 {
log.Println(errs)
return
}
}()
}
```
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: 4a44b0bc3cf2d6701eb158d1ca5443b0314c58fa
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.