Makes http request cached for tests

This commit is contained in:
2016-01-20 13:28:07 +01:00
parent 261c43184e
commit ea62247dad
5 changed files with 23 additions and 20 deletions

View File

@@ -81,7 +81,7 @@ func (c *AlbumCoverCache) fetch(a *Album) (io.ReadCloser, error) {
}
f, err := os.Create(c.coverPath(a))
if err != nil {
resp.Body.Close()
closeOrPanic(resp.Body, "GET:"+a.CoverURL)
return nil, err
}