declare new errs inline if

This commit is contained in:
sentriz
2024-02-20 13:14:13 +00:00
parent 70ff70cdfa
commit c6cec8307a
3 changed files with 3 additions and 3 deletions

View File

@@ -299,7 +299,7 @@ func (c *Client) makeRequest(method string, params url.Values) (LastFM, error) {
defer resp.Body.Close()
var lastfm LastFM
if err = xml.NewDecoder(resp.Body).Decode(&lastfm); err != nil {
if err := xml.NewDecoder(resp.Body).Decode(&lastfm); err != nil {
return LastFM{}, fmt.Errorf("decoding: %w", err)
}