Skip to content

Commit ce495ea

Browse files
committed
Add refund transaction API
1 parent ac7e7df commit ce495ea

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

client.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"encoding/json"
77
"fmt"
88
"io"
9-
"io/ioutil"
109
"net/http"
1110
)
1211

@@ -102,7 +101,7 @@ func (client *Client) do(req *http.Request) (*Response, error) {
102101
return resp, err
103102
}
104103

105-
_, err = io.Copy(ioutil.Discard, httpResponse.Body)
104+
_, err = io.Copy(io.Discard, httpResponse.Body)
106105
if err != nil {
107106
return resp, err
108107
}
@@ -119,7 +118,7 @@ func (client *Client) newResponse(httpResponse *http.Response) (*Response, error
119118
resp := new(Response)
120119
resp.HTTPResponse = httpResponse
121120

122-
buf, err := ioutil.ReadAll(resp.HTTPResponse.Body)
121+
buf, err := io.ReadAll(resp.HTTPResponse.Body)
123122
if err != nil {
124123
return nil, err
125124
}

0 commit comments

Comments
 (0)