More slices instead of pointers of slice

This commit is contained in:
Deluan
2016-03-20 13:14:04 -04:00
parent 3f0030738a
commit 21b39d922c
15 changed files with 37 additions and 37 deletions
+4 -4
View File
@@ -29,10 +29,10 @@ func (r *albumRepository) Get(id string) (*domain.Album, error) {
return rec.(*domain.Album), err
}
func (r *albumRepository) FindByArtist(artistId string) (*domain.Albums, error) {
func (r *albumRepository) FindByArtist(artistId string) (domain.Albums, error) {
var as = make(domain.Albums, 0)
err := r.loadChildren("artist", artistId, &as, domain.QueryOptions{SortBy: "Year"})
return &as, err
return as, err
}
func (r *albumRepository) GetAll(options domain.QueryOptions) (domain.Albums, error) {
@@ -63,10 +63,10 @@ func (r *albumRepository) PurgeInactive(active domain.Albums) ([]string, error)
})
}
func (r *albumRepository) GetStarred(options domain.QueryOptions) (*domain.Albums, error) {
func (r *albumRepository) GetStarred(options domain.QueryOptions) (domain.Albums, error) {
var as = make(domain.Albums, 0)
err := r.loadRange("Starred", true, true, &as, options)
return &as, err
return as, err
}
var _ domain.AlbumRepository = (*albumRepository)(nil)