Skip to content

Commit

Permalink
move defer statement for readability
Browse files Browse the repository at this point in the history
Signed-off-by: mqliang <[email protected]>
  • Loading branch information
mqliang committed Nov 25, 2015
1 parent 9cbfa7b commit 302325a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion registry/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ func loginV1(authConfig *cliconfig.AuthConfig, registryEndpoint *Endpoint) (stri
if err != nil {
return "", fmt.Errorf("Server Error: %s", err)
}
reqStatusCode = req1.StatusCode
defer req1.Body.Close()
reqStatusCode = req1.StatusCode
reqBody, err = ioutil.ReadAll(req1.Body)
if err != nil {
return "", fmt.Errorf("Server Error: [%#v] %s", reqStatusCode, err)
Expand Down

0 comments on commit 302325a

Please sign in to comment.