File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ module github.com/luopengift/requests
33go 1.12
44
55require (
6+ github.com/davecgh/go-spew v1.1.1 // indirect
67 github.com/golang-io/pkg v0.0.0-20190424092429-486169a6c3e1
78 github.com/json-iterator/go v1.1.6 // indirect
89 github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
Original file line number Diff line number Diff line change 1- github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8 =
21github.com/davecgh/go-spew v1.1.0 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
2+ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c =
3+ github.com/davecgh/go-spew v1.1.1 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
34github.com/golang-io/pkg v0.0.0-20190424092429-486169a6c3e1 h1:IIbIh1F/Rt98/cWBRiuBpt9NKHXXYFUuIzJtcVFmlP0 =
45github.com/golang-io/pkg v0.0.0-20190424092429-486169a6c3e1 /go.mod h1:ExL8XxxRpVHx5kKfsiJhlJfd15NcdlRlGUq301ceQ9g =
56github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs =
67github.com/json-iterator/go v1.1.6 /go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU =
8+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg =
79github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd /go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q =
10+ github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI =
811github.com/modern-go/reflect2 v1.0.1 /go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0 =
12+ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM =
913github.com/pmezard/go-difflib v1.0.0 /go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4 =
1014github.com/stretchr/objx v0.1.0 /go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME =
1115github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q =
Original file line number Diff line number Diff line change @@ -28,11 +28,11 @@ func newResponse() *Response {
2828func (resp * Response ) getBody () error {
2929 var err error
3030 resp .once .Do (func () {
31- if resp == nil {
31+ if resp . Response == nil {
3232 return
3333 }
34- defer resp .Body .Close ()
35- _ , err = resp .body .ReadFrom (resp .Body )
34+ defer resp .Response . Body .Close ()
35+ _ , err = resp .body .ReadFrom (resp .Response . Body )
3636 })
3737 return err
3838}
You can’t perform that action at this time.
0 commit comments