mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 21:01:21 +00:00
linting: apply errcheck part1
This commit is contained in:
committed by
Ethan Buchman
parent
d95ba866b8
commit
57ea4987f7
@ -93,7 +93,12 @@ func (c *JSONRPCClient) Call(method string, params map[string]interface{}, resul
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer httpResponse.Body.Close()
|
||||
defer func() {
|
||||
if err := httpResponse.Body.Close(); err != nil {
|
||||
panic(err)
|
||||
return
|
||||
}
|
||||
}()
|
||||
responseBytes, err := ioutil.ReadAll(httpResponse.Body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -128,7 +133,12 @@ func (c *URIClient) Call(method string, params map[string]interface{}, result in
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer func() {
|
||||
if err := resp.Body.Close(); err != nil {
|
||||
panic(err)
|
||||
return
|
||||
}
|
||||
}()
|
||||
responseBytes, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user