diff --git a/lastfm/client.go b/lastfm/client.go index cc38eaa..23d28a4 100644 --- a/lastfm/client.go +++ b/lastfm/client.go @@ -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) } diff --git a/podcast/podcast.go b/podcast/podcast.go index 45a2257..c77dee8 100644 --- a/podcast/podcast.go +++ b/podcast/podcast.go @@ -253,7 +253,7 @@ func (p *Podcasts) RefreshPodcasts() error { errs = append(errs, fmt.Errorf("refreshing podcast with url %q: %w", podcast.URL, err)) continue } - if err = p.RefreshPodcast(podcast, feed.Items); err != nil { + if err := p.RefreshPodcast(podcast, feed.Items); err != nil { errs = append(errs, fmt.Errorf("adding episodes: %w", err)) continue } diff --git a/server/ctrlsubsonic/handlers_raw.go b/server/ctrlsubsonic/handlers_raw.go index 6d2ec72..de3f16a 100644 --- a/server/ctrlsubsonic/handlers_raw.go +++ b/server/ctrlsubsonic/handlers_raw.go @@ -160,7 +160,7 @@ func coverScaleAndSave(reader io.Reader, cachePath string, size int) error { // don't upscale images width = src.Bounds().Dx() } - if err = imaging.Save(imaging.Resize(src, width, 0, imaging.Lanczos), cachePath); err != nil { + if err := imaging.Save(imaging.Resize(src, width, 0, imaging.Lanczos), cachePath); err != nil { return fmt.Errorf("caching %q: %w", cachePath, err) } return nil