errcheck: PR comment fixes

This commit is contained in:
Zach Ramsay
2017-09-21 09:55:06 -04:00
committed by Ethan Buchman
parent b3c5933a23
commit b75d4f73e7
12 changed files with 34 additions and 58 deletions

View File

@ -93,12 +93,8 @@ func (c *JSONRPCClient) Call(method string, params map[string]interface{}, resul
if err != nil {
return nil, err
}
defer func() {
if err := httpResponse.Body.Close(); err != nil {
panic(err)
return
}
}()
defer httpResponse.Body.Close()
responseBytes, err := ioutil.ReadAll(httpResponse.Body)
if err != nil {
return nil, err
@ -133,12 +129,8 @@ func (c *URIClient) Call(method string, params map[string]interface{}, result in
if err != nil {
return nil, err
}
defer func() {
if err := resp.Body.Close(); err != nil {
panic(err)
return
}
}()
defer resp.Body.Close()
responseBytes, err := ioutil.ReadAll(resp.Body)
if err != nil {
return nil, err