Refactored purgeInactive, better test suite setup

This commit is contained in:
Deluan
2020-01-10 19:20:29 -05:00
committed by Deluan Quintão
parent ef79f6342f
commit 9ccd9545e8
7 changed files with 47 additions and 48 deletions
+2 -7
View File
@@ -36,13 +36,8 @@ func (r *artistRepository) Get(id string) (*domain.Artist, error) {
return &a, nil
}
func (r *artistRepository) PurgeInactive(active domain.Artists) ([]string, error) {
activeIDs := make([]string, len(active))
for i, artist := range active {
activeIDs[i] = artist.ID
}
return r.purgeInactive(activeIDs)
func (r *artistRepository) PurgeInactive(activeList domain.Artists) ([]string, error) {
return r.purgeInactive(activeList)
}
var _ domain.ArtistRepository = (*artistRepository)(nil)