Merge pull request #2451 from stevvooe/backport-feed-the-linter

[2.6] registry: feed the linter by removing redundant err check
This commit is contained in:
Stephen Day 2017-11-22 18:09:11 -08:00 committed by GitHub
commit 803ff0da68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)
if err := json.NewEncoder(w).Encode(err); err != nil {
return err
}
return nil
return json.NewEncoder(w).Encode(err)
}

View file

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

View file

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