github-vet / github-vet/rangeloop-pointer-findings
wallnutkraken/ep: cmd/sync.go; 24 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [wallnutkraken/ep](https://www.github.com/wallnutkraken/ep) at [cmd/sync.go](https://github.com/wallnutkraken/ep/blob/473f5cf4083461d3fa3fdb7179ab14f2ec039822/cmd/sync.go#L60-L83)
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.
>
[Click here to see the code in its original context.](https://github.com/wallnutkraken/ep/blob/473f5cf4083461d3fa3fdb7179ab14f2ec039822/cmd/sync.go#L60-L83)
Click here to show the 24 line(s) of Go which triggered the analyzer.
```go
for _, subToSync := range toSync {
go func(sub *subscription.Subscription, waiter *sync.WaitGroup) {
// Get an updated episode list
var err error
newEpisodes := []subscription.Episode{}
if newEpisodes, err = podsync.GetNewEpisodes(*sub); err != nil {
logrus.WithError(err).Errorf("Failed updating podcast [%s]", sub.Tag)
waiter.Done()
return
}
if len(newEpisodes) != 0 {
// Add the newest episodes to the database. First, get the slice that's new.
if err := data.Subscriptions().AddEpisodes(*sub, newEpisodes); err != nil {
logrus.WithError(err).Errorf("Failed saving newly retrieved episodes for [%s]", sub.Name)
} else {
fmt.Printf("Updated podcast [%s/%s] with %d new episodes", sub.Tag, sub.Name, len(newEpisodes))
}
}
// And add the episodes to the subscription in memory
sub.Episodes = append(sub.Episodes, newEpisodes...)
waiter.Done()
}(&subToSync, wg)
}
```
Click here to show extra information the analyzer produced.
```
No path was found through the callgraph that could lead to a function which writes a pointer argument.
No path was found through the callgraph that could lead to a function which passes a pointer to third-party code.
root signature { 2} was not found in the callgraph; reference was passed directly to third-party code
```
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: 473f5cf4083461d3fa3fdb7179ab14f2ec039822
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.