github-vet / github-vet/rangeloop-pointer-findings
SpectraLogic/ds3_go_sdk: ds3_cli/commands/bulk.go; 16 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [SpectraLogic/ds3_go_sdk](https://www.github.com/SpectraLogic/ds3_go_sdk) at [ds3_cli/commands/bulk.go](https://github.com/SpectraLogic/ds3_go_sdk/blob/3e666133cc73db44b082d63119da636681fa1625/ds3_cli/commands/bulk.go#L12-L27)
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 objectList used in defer or goroutine at line 15
[Click here to see the code in its original context.](https://github.com/SpectraLogic/ds3_go_sdk/blob/3e666133cc73db44b082d63119da636681fa1625/ds3_cli/commands/bulk.go#L12-L27)
Click here to show the 16 line(s) of Go which triggered the analyzer.
```go
for _, objectList := range objectLists {
go func() {
// Loop over each object and call the bulk handler.
for _, obj := range objectList.Objects {
// If there was an error, pass it onto the error channel and
// terminate the goroutine.
if err := objectHandler(obj); err != nil {
finish <- err
return
}
}
// Signal that the object list is done.
finish <- nil
}()
}
```
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: 3e666133cc73db44b082d63119da636681fa1625
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.