From ebc1905cb4ebd5440a9d665d059c65e3f4ee39e3 Mon Sep 17 00:00:00 2001 From: Yun Date: Wed, 8 Nov 2023 09:51:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96test=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- curl_test.go | 18 ------------------ curlx_test.go | 10 ++++++++++ 2 files changed, 10 insertions(+), 18 deletions(-) delete mode 100644 curl_test.go diff --git a/curl_test.go b/curl_test.go deleted file mode 100644 index 48034b8..0000000 --- a/curl_test.go +++ /dev/null @@ -1,18 +0,0 @@ -package curlx_test - -import ( - "context" - "testing" - - "code.yun.ink/open/curlx" -) - -func TestCurlx(t *testing.T) { - p := curlx.CurlParams{} - p.Url = "http://www.baidu.com" - p.Method = "GET" - - resp,code,err := curlx.NewCurlx().Send(context.Background(), &p) - t.Log(resp,code,err) - -} diff --git a/curlx_test.go b/curlx_test.go index 11ca36e..310d361 100644 --- a/curlx_test.go +++ b/curlx_test.go @@ -8,6 +8,16 @@ import ( "testing" ) +func TestCurlx(t *testing.T) { + p := CurlParams{} + p.Url = "http://www.baidu.com" + p.Method = "GET" + + resp, code, err := NewCurlx().Send(context.Background(), &p) + t.Log(resp, code, err) + +} + func TestSendFile(t *testing.T) { file, err := os.Open("./go.mod")