registry: feed the linter by removing redundant err check

Signed-off-by: Stephen J Day <stephen.day@docker.com>
(cherry picked from commit 4abf680c76)
Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day 2017-09-29 13:27:49 -07:00
parent b7a08ef5bb
commit 22889ae085
No known key found for this signature in database
GPG key ID: 67B3DED84EDC823F
3 changed files with 3 additions and 15 deletions

View file

@ -36,9 +36,5 @@ func ServeJSON(w http.ResponseWriter, err error) error {
w.WriteHeader(sc) w.WriteHeader(sc)
if err := json.NewEncoder(w).Encode(err); err != nil { return json.NewEncoder(w).Encode(err)
return err
}
return nil
} }

View file

@ -79,9 +79,5 @@ func ping(manager challenge.Manager, endpoint, versionHeader string) error {
} }
defer resp.Body.Close() defer resp.Body.Close()
if err := manager.AddResponse(resp); err != nil { return manager.AddResponse(resp)
return err
}
return nil
} }

View file

@ -98,11 +98,7 @@ func (bw *blobWriter) Cancel(ctx context.Context) error {
context.GetLogger(ctx).Errorf("error closing blobwriter: %s", err) context.GetLogger(ctx).Errorf("error closing blobwriter: %s", err)
} }
if err := bw.removeResources(ctx); err != nil { return bw.removeResources(ctx)
return err
}
return nil
} }
func (bw *blobWriter) Size() int64 { func (bw *blobWriter) Size() int64 {