Closed PaulIvanov closed 3 years ago
If you're trying to pass a slice into a variadic method like that you need to append a ...
So
AddTrackToPlaylist(id, myArr...)
Thanks for the quick reply, I knew it had to be something I was doing wrong. I had never learned of variadic functions in golang yet. Thank!
When I attempt to use
func (c *Client) AddTracksToPlaylist(playlistID ID, trackIDs ...ID)
on the client. My compiler fails with the following error:cannot use myArr (type []spotify.ID) as type spotify.ID in argument to client.AddTracksToPlaylist
Maybe this is an oversight on my part, but is there a certain type I need to be using besides an array or slice for this?