forked from TrueCloudLab/distribution
Enable bodyclose linter
Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
parent
597e8a6b34
commit
3dbfbc7255
11 changed files with 87 additions and 15 deletions
|
@ -49,6 +49,7 @@ func (hbu *httpBlobUpload) ReadFrom(r io.Reader) (n int64, err error) {
|
|||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
if !SuccessStatus(resp.StatusCode) {
|
||||
return 0, hbu.handleErrorResponse(resp)
|
||||
|
@ -84,6 +85,7 @@ func (hbu *httpBlobUpload) Write(p []byte) (n int, err error) {
|
|||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
if !SuccessStatus(resp.StatusCode) {
|
||||
return 0, hbu.handleErrorResponse(resp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue