clean up code because err is always nil

Signed-off-by: zhipengzuo <zuozhipeng@baidu.com>
This commit is contained in:
zhipengzuo 2020-07-22 10:54:46 +08:00
parent 53e18a9d9b
commit f361d443b7

View file

@ -72,15 +72,10 @@ func (pbs *proxyBlobStore) serveLocal(ctx context.Context, w http.ResponseWriter
return false, nil
}
if err == nil {
proxyMetrics.BlobPush(uint64(localDesc.Size))
return true, pbs.localStore.ServeBlob(ctx, w, r, dgst)
}
return false, nil
}
func (pbs *proxyBlobStore) storeLocal(ctx context.Context, dgst digest.Digest) error {
defer func() {
mu.Lock()