mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 15:16:42 +00:00
lib/promscrape/discovery/gce: make golint happy by ignoring resp.Body.Close() result
This commit is contained in:
parent
987fcce93d
commit
7c74efd640
1 changed files with 3 additions and 1 deletions
|
@ -54,7 +54,9 @@ func getInstancesPage(cfg *apiConfig, pageToken string) ([]Instance, string, err
|
|||
if err != nil {
|
||||
return nil, "", fmt.Errorf("cannot obtain instances data from API server: %s", err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer func() {
|
||||
_ = resp.Body.Close()
|
||||
}()
|
||||
data, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil, "", fmt.Errorf("cannot read instances data from API server: %s", err)
|
||||
|
|
Loading…
Reference in a new issue