Skip to content

Commit

Permalink
Clarify that resp.Body is always non-nil.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsnowcurrently committed Apr 26, 2016
1 parent 369a38b commit 280786d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions downloader/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func NewHTTPBlobOpener(hostnameVerification utils.SSLHostnameVerification) func(
return nil, err
}
if resp.StatusCode != http.StatusOK {
// resp.Body is always non-nil. (see https://golang.org/pkg/net/http/#Response)
resp.Body.Close()
return nil, errors.Errorf("bad http response: %v", resp.Status)
}
Expand Down

0 comments on commit 280786d

Please sign in to comment.