refactor: moved http.Client to model.RequestContext
Signed-off-by: SoXX <soxx@fenpa.ws>
This commit is contained in:
parent
bd1f33dced
commit
141a06a5a0
@ -31,14 +31,14 @@ func TestGetTag(t *testing.T) {
|
||||
httpmock.RegisterResponder("GET", "https://e621.net/tags/165165.json", jsonResponser)
|
||||
|
||||
requestContext := model.RequestContext{
|
||||
Client: http.Client{},
|
||||
Host: "https://e621.net",
|
||||
UserAgent: "Go-e621-SDK (@username)",
|
||||
Username: "memo",
|
||||
APIKey: "123456",
|
||||
}
|
||||
|
||||
client := http.Client{}
|
||||
tag, err := GetTag(client, requestContext, "165165")
|
||||
tag, err := GetTag(requestContext, "165165")
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
|
Reference in New Issue
Block a user