mirror of https://github.com/docker/docs.git
move defer statement for readability
Signed-off-by: mqliang <mqliang.zju@gmail.com>
This commit is contained in:
parent
9cbfa7b00b
commit
302325a3aa
|
@ -53,8 +53,8 @@ func loginV1(authConfig *cliconfig.AuthConfig, registryEndpoint *Endpoint) (stri
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("Server Error: %s", err)
|
return "", fmt.Errorf("Server Error: %s", err)
|
||||||
}
|
}
|
||||||
reqStatusCode = req1.StatusCode
|
|
||||||
defer req1.Body.Close()
|
defer req1.Body.Close()
|
||||||
|
reqStatusCode = req1.StatusCode
|
||||||
reqBody, err = ioutil.ReadAll(req1.Body)
|
reqBody, err = ioutil.ReadAll(req1.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("Server Error: [%#v] %s", reqStatusCode, err)
|
return "", fmt.Errorf("Server Error: [%#v] %s", reqStatusCode, err)
|
||||||
|
|
Loading…
Reference in New Issue