From f085aa4adceff90e5690599e7996340ce2e68cd6 Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Tue, 4 Jun 2013 13:51:12 +0000 Subject: [PATCH] drop/omit --- docs/registry.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/registry.go b/docs/registry.go index aeae3fe4..b6cda928 100644 --- a/docs/registry.go +++ b/docs/registry.go @@ -15,7 +15,7 @@ import ( "strings" ) -var ErrAlreadyExists error = errors.New("Image already exists") +var ErrAlreadyExists = errors.New("Image already exists") func doWithCookies(c *http.Client, req *http.Request) (*http.Response, error) { for _, cookie := range c.Jar.Cookies(req.URL) { @@ -396,11 +396,11 @@ func (r *Registry) PushImageJsonIndex(remote string, imgList []*ImgData, validat } if validate { if res.StatusCode != 204 { - if errBody, err := ioutil.ReadAll(res.Body); err != nil { + errBody, err := ioutil.ReadAll(res.Body) + if err != nil { return nil, err - } else { - return nil, fmt.Errorf("Error: Status %d trying to push checksums %s: %s", res.StatusCode, remote, errBody) } + return nil, fmt.Errorf("Error: Status %d trying to push checksums %s: %s", res.StatusCode, remote, errBody) } }