fixed lint error

This commit is contained in:
Jarek Kowalski
2018-09-14 19:39:59 -07:00
parent 210d165148
commit d0abb4fd36

View File

@@ -156,8 +156,8 @@ func (c *blockCache) sweepDirectory(ctx context.Context) (err error) {
if totalRetainedSize > c.maxSizeBytes {
oldest := heap.Pop(&h).(storage.BlockMetadata)
if err := c.cacheStorage.DeleteBlock(ctx, it.BlockID); err != nil {
log.Warningf("unable to remove %v: %v", it.BlockID, err)
if delerr := c.cacheStorage.DeleteBlock(ctx, it.BlockID); delerr != nil {
log.Warningf("unable to remove %v: %v", it.BlockID, delerr)
} else {
totalRetainedSize -= oldest.Length
}