From 923734bd209ecaed6c548a5cdb951d5a3a27b95c Mon Sep 17 00:00:00 2001 From: guo-shaoge Date: Tue, 18 May 2021 06:30:11 +0800 Subject: [PATCH] fix lint Signed-off-by: guo-shaoge --- util/checksum/checksum.go | 3 +-- util/chunk/disk_test.go | 7 +++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/util/checksum/checksum.go b/util/checksum/checksum.go index 6c4d230ed726b..ef90f44e7cb00 100644 --- a/util/checksum/checksum.go +++ b/util/checksum/checksum.go @@ -15,11 +15,10 @@ package checksum import ( "encoding/binary" + "errors" "hash/crc32" "io" "sync" - - "github.com/pingcap/errors" ) const ( diff --git a/util/chunk/disk_test.go b/util/chunk/disk_test.go index 618e14bb963a2..c534f6c49b009 100644 --- a/util/chunk/disk_test.go +++ b/util/chunk/disk_test.go @@ -333,7 +333,8 @@ func testReaderWithCache(c *check.C) { // It means only new reader is alloced after writing. oriReader := l.r for i := 0; i < 100; i++ { - row, _ = l.GetRow(RowPtr{0, 0}) + row, err = l.GetRow(RowPtr{0, 0}) + c.Assert(err, check.IsNil) c.Assert(oriReader == l.r, check.IsTrue) c.Assert(l.isReaderStale, check.IsFalse) } @@ -345,12 +346,14 @@ func testReaderWithCache(c *check.C) { // New reader is generated when reading. row, err = l.GetRow(RowPtr{1, 0}) + c.Assert(err, check.IsNil) c.Assert(oriReader != l.r, check.IsTrue) c.Assert(l.isReaderStale, check.IsFalse) oriReader = l.r for i := 0; i < 100; i++ { - row, _ = l.GetRow(RowPtr{0, 0}) + row, err = l.GetRow(RowPtr{0, 0}) + c.Assert(err, check.IsNil) c.Assert(oriReader == l.r, check.IsTrue) c.Assert(l.isReaderStale, check.IsFalse) }