From 0954a776c28dc22400ffac7d7cafb24053e53d4a Mon Sep 17 00:00:00 2001 From: Markus Kuuse Date: Thu, 1 Feb 2024 14:03:07 +0200 Subject: [PATCH] Added error check to pass golint --- listenbrainz.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/listenbrainz.go b/listenbrainz.go index e8d4d41..9f75998 100644 --- a/listenbrainz.go +++ b/listenbrainz.go @@ -118,7 +118,10 @@ func getTracks(mbids []string) Track { body := lbRequest(fmt.Sprintf("metadata/recording/?recording_mbids=%s&inc=release", str_mbids)) - json.Unmarshal(body, &recordings) + err := json.Unmarshal(body, &recordings) + if err != nil { + log.Fatalf("Failed to unmarshal body: %v", err) + } for _, recording := range recordings { tracks = append(tracks, struct {