From d0abb4fd36b77eae07c7c4b77f4e0bfb6a193931 Mon Sep 17 00:00:00 2001 From: Jarek Kowalski Date: Fri, 14 Sep 2018 19:39:59 -0700 Subject: [PATCH] fixed lint error --- repo/block/block_cache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repo/block/block_cache.go b/repo/block/block_cache.go index fc54fc106..51eb3befd 100644 --- a/repo/block/block_cache.go +++ b/repo/block/block_cache.go @@ -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 }