From 141a06a5a005839de7491fc5a2d1d37fcdd46b49 Mon Sep 17 00:00:00 2001 From: SoXX Date: Mon, 23 Oct 2023 10:30:11 +0200 Subject: [PATCH] refactor: moved http.Client to model.RequestContext Signed-off-by: SoXX --- pkg/e621/endpoints/tag_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/e621/endpoints/tag_test.go b/pkg/e621/endpoints/tag_test.go index 655853e..9282e33 100644 --- a/pkg/e621/endpoints/tag_test.go +++ b/pkg/e621/endpoints/tag_test.go @@ -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