mirror of
https://github.com/distribution/distribution.git
synced 2025-09-09 02:40:00 +00:00
Enable bodyclose linter
Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
@@ -67,6 +67,8 @@ func fetchAWSIPs(url string) (awsIPResponse, error) {
|
||||
if err != nil {
|
||||
return response, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != 200 {
|
||||
body, _ := io.ReadAll(resp.Body)
|
||||
return response, fmt.Errorf("failed to fetch network data. response = %s", body)
|
||||
|
Reference in New Issue
Block a user