github-vet / github-vet/rangeloop-pointer-findings
l3uddz/crop: cmd/dedupe.go; 30 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [l3uddz/crop](https://www.github.com/l3uddz/crop) at [cmd/dedupe.go](https://github.com/l3uddz/crop/blob/9c9802832ef5db0964570caf2c194790379583df/cmd/dedupe.go#L26-L55)
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 uploaderConfig was used in a composite literal at line 42
[Click here to see the code in its original context.](https://github.com/l3uddz/crop/blob/9c9802832ef5db0964570caf2c194790379583df/cmd/dedupe.go#L26-L55)
Click here to show the 30 line(s) of Go which triggered the analyzer.
```go
for _, uploaderConfig := range config.Config.Uploader {
log := log.WithField("uploader", uploaderConfig.Name)
// skip disabled uploader(s)
if !uploaderConfig.Enabled {
log.Debug("Skipping disabled uploader")
continue
}
// skip uploader specific chosen
if flagUploader != "" && !strings.EqualFold(uploaderConfig.Name, flagUploader) {
log.Debugf("Skipping uploader as not: %q", flagUploader)
continue
}
// create uploader
upload, err := uploader.New(config.Config, &uploaderConfig, uploaderConfig.Name)
if err != nil {
log.WithError(err).Error("Failed initializing uploader, skipping...")
continue
}
log.Info("Dedupe commencing...")
// perform upload
if err := performDedupe(upload); err != nil {
upload.Log.WithError(err).Error("Error occurred while running dedupe, skipping...")
continue
}
}
```
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: 9c9802832ef5db0964570caf2c194790379583df
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.