Merge pull request #2416 from stevvooe/feed-the-linter
registry: feed the linter by removing redundant err check
This commit is contained in:
commit
bb49a1685d
3 changed files with 3 additions and 15 deletions
|
@ -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
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,11 +104,7 @@ func (bw *blobWriter) Cancel(ctx context.Context) error {
|
||||||
dcontext.GetLogger(ctx).Errorf("error closing blobwriter: %s", err)
|
dcontext.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 {
|
||||||
|
|
Loading…
Reference in a new issue