1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

remove redundant code and better error msg

Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
allencloud 2017-02-10 17:16:34 +08:00
parent 584e399d96
commit 5c0ea56d56
2 changed files with 1 additions and 5 deletions

View file

@ -8,10 +8,6 @@ import (
// SwarmUnlock unlockes locked swarm.
func (cli *Client) SwarmUnlock(ctx context.Context, req swarm.UnlockRequest) error {
serverResp, err := cli.post(ctx, "/swarm/unlock", nil, req, nil)
if err != nil {
return err
}
ensureReaderClosed(serverResp)
return err
}

View file

@ -29,7 +29,7 @@ func (cli *Client) VolumesPrune(ctx context.Context, pruneFilters filters.Args)
defer ensureReaderClosed(serverResp)
if err := json.NewDecoder(serverResp.body).Decode(&report); err != nil {
return report, fmt.Errorf("Error retrieving disk usage: %v", err)
return report, fmt.Errorf("Error retrieving volume prune report:: %v", err)
}
return report, nil