Fix lint errors

This commit is contained in:
Deluan
2021-02-08 10:36:07 -05:00
committed by Deluan Quintão
parent 877cdf1d5c
commit 365dff6435
3 changed files with 6 additions and 8 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ var _ = Describe("CachedHttpClient", func() {
body, err = ioutil.ReadAll(resp.Body) body, err = ioutil.ReadAll(resp.Body)
Expect(err).To(BeNil()) Expect(err).To(BeNil())
Expect(string(body)).To(Equal("Hello, []")) Expect(string(body)).To(Equal("Hello, []"))
Expect(string(header)).To(Equal("this is a header")) Expect(header).To(Equal("this is a header"))
Expect(requestsReceived).To(Equal(3)) Expect(requestsReceived).To(Equal(3))
}) })
-1
View File
@@ -56,7 +56,6 @@ func (l *lastfmAgent) GetURL(name, mbid string) (string, error) {
return "", ErrNotFound return "", ErrNotFound
} }
return a.URL, nil return a.URL, nil
} }
func (l *lastfmAgent) GetBiography(name, mbid string) (string, error) { func (l *lastfmAgent) GetBiography(name, mbid string) (string, error) {
+5 -6
View File
@@ -65,13 +65,12 @@ func (e *externalInfo2) UpdateArtistInfo(ctx context.Context, id string, similar
return nil, err return nil, err
} }
// TODO Uncomment
// If we have fresh info, just return it // If we have fresh info, just return it
//if time.Since(artist.ExternalInfoUpdatedAt) < consts.ArtistInfoTimeToLive { if time.Since(artist.ExternalInfoUpdatedAt) < time.Second { //consts.ArtistInfoTimeToLive {
// log.Debug("Found cached ArtistInfo", "updatedAt", artist.ExternalInfoUpdatedAt, "name", artist.Name) log.Debug("Found cached ArtistInfo", "updatedAt", artist.ExternalInfoUpdatedAt, "name", artist.Name)
// err := e.loadSimilar(ctx, artist, includeNotPresent) err := e.loadSimilar(ctx, artist, includeNotPresent)
// return artist, err return artist, err
//} }
log.Debug(ctx, "ArtistInfo not cached", "updatedAt", artist.ExternalInfoUpdatedAt, "id", id, "name", artist.Name) log.Debug(ctx, "ArtistInfo not cached", "updatedAt", artist.ExternalInfoUpdatedAt, "id", id, "name", artist.Name)
wg := &sync.WaitGroup{} wg := &sync.WaitGroup{}