Skip to content
Snippets Groups Projects
Commit 7bb3878f authored by Jonah Husson's avatar Jonah Husson
Browse files

Fix go func to be pretty

parent 0a87aec9
No related branches found
No related tags found
2 merge requests!32Release,!27Gofunc for notify, set toSend properly, fix unsent handling
......@@ -206,11 +206,10 @@ func (nb *Impl) SendBatch(data map[int64][]*notifications.Data) ([]*notification
if err != nil {
return nil, errors.WithMessage(err, "Failed to get list of tokens to notify")
}
for _, n := range toNotify {
tn := n
go func() {
nb.notify(csvs[tn.EphemeralId], tn)
}()
for i := range toNotify {
go func(res storage.GTNResult) {
nb.notify(csvs[res.EphemeralId], res)
}(toNotify[i])
}
return unsent, nil
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment