Using pointers for the receivers

This commit is contained in:
Deluan
2016-03-21 23:11:57 -04:00
parent 36160be32a
commit 23cf069100
5 changed files with 49 additions and 49 deletions
+3 -3
View File
@@ -10,7 +10,7 @@ type Playlists interface {
}
func NewPlaylists(pr domain.PlaylistRepository, mr domain.MediaFileRepository) Playlists {
return playlists{pr, mr}
return &playlists{pr, mr}
}
type playlists struct {
@@ -18,7 +18,7 @@ type playlists struct {
mfileRepo domain.MediaFileRepository
}
func (p playlists) GetAll() (domain.Playlists, error) {
func (p *playlists) GetAll() (domain.Playlists, error) {
return p.plsRepo.GetAll(domain.QueryOptions{})
}
@@ -32,7 +32,7 @@ type PlaylistInfo struct {
Owner string
}
func (p playlists) Get(id string) (*PlaylistInfo, error) {
func (p *playlists) Get(id string) (*PlaylistInfo, error) {
pl, err := p.plsRepo.Get(id)
if err == domain.ErrNotFound {
return nil, ErrDataNotFound