move lastfm mock client stuff to a new package so we can reuse it

for the artistcache test
This commit is contained in:
sentriz
2023-09-14 00:00:47 +01:00
parent c374577328
commit a15b584fda
9 changed files with 82 additions and 104 deletions

View File

@@ -29,10 +29,12 @@ type Client struct {
httpClient *http.Client
}
func NewClientCustom(httpClient *http.Client) *Client {
return &Client{httpClient: httpClient}
}
func NewClient() *Client {
return &Client{
httpClient: http.DefaultClient,
}
return NewClientCustom(http.DefaultClient)
}
func getParamSignature(params url.Values, secret string) string {