From 07abe80065aa0ff3c203b2b0dcfb20c7a0a8c7c5 Mon Sep 17 00:00:00 2001 From: myOmikron Date: Wed, 25 Jan 2023 21:48:12 +0100 Subject: General cleanup and deprecation fixes --- spotify.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spotify.go') diff --git a/spotify.go b/spotify.go index 951bbd9..0c0ea8f 100644 --- a/spotify.go +++ b/spotify.go @@ -100,7 +100,7 @@ func (spotify *SpotifyBackend) Search(keyword string) []Song { fmt.Printf("\nTracks: %d (total %d)\n", len(res.Tracks.Hits), res.Tracks.Total) - results := []Song{} + results := make([]Song, 0) for _, track := range res.Tracks.Hits { uriParts := strings.Split(track.Uri, ":") results = append(results, NewSong(track.Name, track.Artists[0].Name, "spotify", uriParts[len(uriParts)-1])) -- cgit v1.2.3