refactor: clean code
This commit is contained in:
@@ -73,6 +73,9 @@ func (c *Client) sendRequest(method string, path string, params interface{}) (*r
|
||||
func (c *Client) sendRequestWithResult(method string, path string, params interface{}, result interface{}) error {
|
||||
resp, err := c.sendRequest(method, path, params)
|
||||
if err != nil {
|
||||
if resp != nil {
|
||||
json.Unmarshal(resp.Body(), &result)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user