mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Unify the defer syntax
A simple change to unify the http stream closing syntax. Signed-off-by: Hamish Hutchings <hamish@aoeu.me>
This commit is contained in:
parent
ad1354ffb4
commit
6a3d1e3e3e
1 changed files with 1 additions and 1 deletions
|
@ -19,10 +19,10 @@ func (cli *Client) ContainerInspect(ctx context.Context, containerID string) (ty
|
|||
if err != nil {
|
||||
return types.ContainerJSON{}, wrapResponseError(err, serverResp, "container", containerID)
|
||||
}
|
||||
defer ensureReaderClosed(serverResp)
|
||||
|
||||
var response types.ContainerJSON
|
||||
err = json.NewDecoder(serverResp.body).Decode(&response)
|
||||
ensureReaderClosed(serverResp)
|
||||
return response, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue