优化test文件

This commit is contained in:
Yun
2023-11-08 09:51:25 +08:00
parent 0274580168
commit ebc1905cb4
2 changed files with 10 additions and 18 deletions
-18
View File
@@ -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)
}
+10
View File
@@ -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")