Skip to content

Commit 84680bb

Browse files
committed
update
1 parent 08737b3 commit 84680bb

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

http_test.go

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Author: Tony.Shao
3+
4+
* Github: github.com/xiocode
5+
* File: http_test.go
6+
* Description: test
7+
*/
8+
9+
package httplib
10+
11+
import (
12+
"bytes"
13+
"fmt"
14+
"testing"
15+
)
16+
17+
func TestHTTPGet(t *testing.T) {
18+
var buf bytes.Buffer
19+
_, err := GET(&buf, "http://www.baidu.com")
20+
if err != nil {
21+
panic(err)
22+
}
23+
fmt.Println(buf.String())
24+
}

utils.go

-5
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,8 @@
88

99
package httplib
1010

11-
import (
12-
"github.com/going/toolkit/log"
13-
)
14-
1511
func checkError(err error) bool {
1612
if err != nil {
17-
log.Error(err)
1813
return true
1914
}
2015
return false

0 commit comments

Comments
 (0)