Fix gosec's G601

This commit is contained in:
Deluan
2020-05-13 15:32:42 -04:00
parent 162971f7b3
commit 5ce3135f00
6 changed files with 22 additions and 11 deletions
+2 -1
View File
@@ -74,7 +74,8 @@ func (r *playlistRepository) GetAll(options ...model.QueryOptions) (model.Playli
func (r *playlistRepository) toModels(all []playlist) model.Playlists {
result := make(model.Playlists, len(all))
for i, p := range all {
for i := range all {
p := all[i]
result[i] = r.toModel(&p)
}
return result