From 1448510a623d7c0ae5f9814c53b62e1d1adefe28 Mon Sep 17 00:00:00 2001 From: sre Date: Mon, 27 Jun 2022 13:02:17 +0800 Subject: [PATCH] body, err := httpQuery.GET("https://api.ethermine.org/poolStats") --- httpQuery/get.go | 2 +- httpQuery/get_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/httpQuery/get.go b/httpQuery/get.go index 0d00dcd..7a13ffa 100644 --- a/httpQuery/get.go +++ b/httpQuery/get.go @@ -6,7 +6,7 @@ import ( "net/http" ) -func GET(url string) ([]byte, error) { +func (hq *HTTPQuery) GET(url string) ([]byte, error) { method := "GET" client := &http.Client{} diff --git a/httpQuery/get_test.go b/httpQuery/get_test.go index c959b03..ccd3c18 100644 --- a/httpQuery/get_test.go +++ b/httpQuery/get_test.go @@ -3,7 +3,7 @@ package httpQuery import "testing" func TestGet(t *testing.T) { - body, err := GET("https://api.ethermine.org/poolStats") + body, err := httpQuery.GET("https://api.ethermine.org/poolStats") if err != nil { t.Error(err) }