Skip to content
This repository was archived by the owner on Aug 3, 2020. It is now read-only.

Commit d2f165e

Browse files
author
Denise
authored
Merge pull request #6 from joshwget/fix-go-vet-error
Fix go vet error
2 parents 498fa05 + f6ba1f1 commit d2f165e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

rancher/rancher.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,11 +922,10 @@ func (r *CloudProvider) get(url string) ([]byte, error) {
922922
}
923923
req.Header.Add("Authorization", basicAuth(r.conf.Global.CattleAccessKey, r.conf.Global.CattleSecretKey))
924924
resp, err := http.DefaultClient.Do(req)
925-
926-
defer resp.Body.Close()
927925
if err != nil {
928926
return nil, fmt.Errorf("Couldn't get %s: %v", url, err)
929927
}
928+
defer resp.Body.Close()
930929

931930
body, err := ioutil.ReadAll(resp.Body)
932931
if err != nil {

0 commit comments

Comments
 (0)