mirror of
https://github.com/navidrome/navidrome.git
synced 2025-06-15 23:02:24 +03:00
Fix lint errors
This commit is contained in:
parent
07d96f8308
commit
00b6f895bb
@ -76,7 +76,7 @@ func (e *externalInfo) callArtistInfo(ctx context.Context, artist *model.Artist,
|
|||||||
go func() {
|
go func() {
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
lfmArtist, err := e.lfm.ArtistGetInfo(nil, artist.Name)
|
lfmArtist, err := e.lfm.ArtistGetInfo(ctx, artist.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(ctx, "Error calling Last.FM", "artist", artist.Name, err)
|
log.Error(ctx, "Error calling Last.FM", "artist", artist.Name, err)
|
||||||
} else {
|
} else {
|
||||||
@ -97,7 +97,7 @@ func (e *externalInfo) callArtistImages(ctx context.Context, artist *model.Artis
|
|||||||
go func() {
|
go func() {
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
spfImages, err := e.spf.ArtistImages(nil, artist.Name)
|
spfImages, err := e.spf.ArtistImages(ctx, artist.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(ctx, "Error calling Spotify", "artist", artist.Name, err)
|
log.Error(ctx, "Error calling Spotify", "artist", artist.Name, err)
|
||||||
} else {
|
} else {
|
||||||
|
@ -75,7 +75,7 @@ var _ = Describe("Client", func() {
|
|||||||
Body: ioutil.NopCloser(bytes.NewBufferString(`{"access_token": "NEW_ACCESS_TOKEN","token_type": "Bearer","expires_in": 3600}`)),
|
Body: ioutil.NopCloser(bytes.NewBufferString(`{"access_token": "NEW_ACCESS_TOKEN","token_type": "Bearer","expires_in": 3600}`)),
|
||||||
})
|
})
|
||||||
|
|
||||||
token, err := client.authorize(nil)
|
token, err := client.authorize(context.TODO())
|
||||||
Expect(err).To(BeNil())
|
Expect(err).To(BeNil())
|
||||||
Expect(token).To(Equal("NEW_ACCESS_TOKEN"))
|
Expect(token).To(Equal("NEW_ACCESS_TOKEN"))
|
||||||
auth := httpClient.lastRequest.Header.Get("Authorization")
|
auth := httpClient.lastRequest.Header.Get("Authorization")
|
||||||
@ -88,7 +88,7 @@ var _ = Describe("Client", func() {
|
|||||||
Body: ioutil.NopCloser(bytes.NewBufferString(`{"error":"invalid_client","error_description":"Invalid client"}`)),
|
Body: ioutil.NopCloser(bytes.NewBufferString(`{"error":"invalid_client","error_description":"Invalid client"}`)),
|
||||||
})
|
})
|
||||||
|
|
||||||
_, err := client.authorize(nil)
|
_, err := client.authorize(context.TODO())
|
||||||
Expect(err).To(MatchError("spotify error(invalid_client): Invalid client"))
|
Expect(err).To(MatchError("spotify error(invalid_client): Invalid client"))
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ var _ = Describe("Client", func() {
|
|||||||
Body: ioutil.NopCloser(bytes.NewBufferString(`{NOT_VALID}`)),
|
Body: ioutil.NopCloser(bytes.NewBufferString(`{NOT_VALID}`)),
|
||||||
})
|
})
|
||||||
|
|
||||||
_, err := client.authorize(nil)
|
_, err := client.authorize(context.TODO())
|
||||||
Expect(err).To(MatchError("invalid character 'N' looking for beginning of object key string"))
|
Expect(err).To(MatchError("invalid character 'N' looking for beginning of object key string"))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user