Closed pixelrazor closed 4 years ago
GetArtistAlbums(id) will call return c.GetArtistAlbumsOpt(artistID, nil, nil) The third arg should not be supplied.
GetArtistAlbums(id)
c.GetArtistAlbumsOpt(artistID, nil, nil)
func (c *Client) GetArtistAlbumsOpt(artistID ID, options *Options, ts ...*AlbumType) (*SimpleAlbumPage, error) { spotifyURL := fmt.Sprintf("%sartists/%s/albums", c.baseURL, artistID) // add optional query string if options were specified values := url.Values{} if ts != nil { types := make([]string, len(ts)) for i := range ts { types[i] = ts[i].encode() } values.Set("include_groups", strings.Join(types, ",")) }
that for loops panics, since ts will not be nill, but will instead be [nil]
GetArtistAlbums(id)
will call returnc.GetArtistAlbumsOpt(artistID, nil, nil)
The third arg should not be supplied.that for loops panics, since ts will not be nill, but will instead be [nil]