Fixes after running errcheck

This commit is contained in:
Nick Craig-Wood 2014-07-25 18:19:49 +01:00
parent 125fc8f1f0
commit 17ffb0855f
6 changed files with 22 additions and 14 deletions

View file

@ -530,7 +530,7 @@ func (o *FsObjectStorage) Open() (in io.ReadCloser, err error) {
return nil, err
}
if res.StatusCode != 200 {
res.Body.Close()
_ = res.Body.Close() // ignore error
return nil, fmt.Errorf("Bad response: %d: %s", res.StatusCode, res.Status)
}
return res.Body, nil