diff --git a/br/pkg/lightning/common/util_test.go b/br/pkg/lightning/common/util_test.go index 3915a318b06c5..3668626276938 100644 --- a/br/pkg/lightning/common/util_test.go +++ b/br/pkg/lightning/common/util_test.go @@ -22,7 +22,7 @@ import ( "net/http/httptest" "time" - sqlmock "github.com/DATA-DOG/go-sqlmock" + "github.com/DATA-DOG/go-sqlmock" . "github.com/pingcap/check" "github.com/pingcap/errors" "github.com/pingcap/tidb/br/pkg/lightning/common" diff --git a/br/pkg/summary/collector.go b/br/pkg/summary/collector.go index 6c82bf54fba25..b0a3735db0c88 100644 --- a/br/pkg/summary/collector.go +++ b/br/pkg/summary/collector.go @@ -51,7 +51,7 @@ type LogCollector interface { type logFunc func(msg string, fields ...zap.Field) -var collector LogCollector = NewLogCollector(log.Info) +var collector = NewLogCollector(log.Info) // InitCollector initilize global collector instance. func InitCollector( // revive:disable-line:flag-parameter diff --git a/sessionctx/binloginfo/binloginfo_test.go b/sessionctx/binloginfo/binloginfo_test.go index 6178944ddffa9..0eee0d77eafdc 100644 --- a/sessionctx/binloginfo/binloginfo_test.go +++ b/sessionctx/binloginfo/binloginfo_test.go @@ -42,7 +42,7 @@ import ( "github.com/pingcap/tidb/types" "github.com/pingcap/tidb/util/codec" "github.com/pingcap/tidb/util/collate" - binlog "github.com/pingcap/tipb/go-binlog" + "github.com/pingcap/tipb/go-binlog" "github.com/stretchr/testify/require" "google.golang.org/grpc" ) diff --git a/store/mockstore/unistore/cophandler/topn.go b/store/mockstore/unistore/cophandler/topn.go index 185317cbec1ee..54c0853a7199a 100644 --- a/store/mockstore/unistore/cophandler/topn.go +++ b/store/mockstore/unistore/cophandler/topn.go @@ -23,7 +23,7 @@ import ( "github.com/pingcap/tidb/sessionctx/stmtctx" "github.com/pingcap/tidb/types" "github.com/pingcap/tidb/util/collate" - tipb "github.com/pingcap/tipb/go-tipb" + "github.com/pingcap/tipb/go-tipb" ) type sortRow struct { diff --git a/table/tables/tables_test.go b/table/tables/tables_test.go index a3d13a3bfa89e..bc2d8440f7e04 100644 --- a/table/tables/tables_test.go +++ b/table/tables/tables_test.go @@ -36,7 +36,7 @@ import ( "github.com/pingcap/tidb/types" "github.com/pingcap/tidb/util" "github.com/pingcap/tidb/util/testutil" - binlog "github.com/pingcap/tipb/go-binlog" + "github.com/pingcap/tipb/go-binlog" "github.com/stretchr/testify/require" "google.golang.org/grpc" ) diff --git a/util/checksum/checksum_test.go b/util/checksum/checksum_test.go index b3d205954c7ff..57367b6eff37a 100644 --- a/util/checksum/checksum_test.go +++ b/util/checksum/checksum_test.go @@ -479,7 +479,7 @@ func assertUnderlyingWrite(t *testing.T, encrypt bool, f io.WriteCloser, fc func } func underlyingReadAt(f io.ReaderAt, encrypt bool, ctrCipher *encrypt2.CtrCipher, n, off int) error { - var underlying io.ReaderAt = f + var underlying = f if encrypt { underlying = encrypt2.NewReader(underlying, ctrCipher) } @@ -492,7 +492,7 @@ func underlyingReadAt(f io.ReaderAt, encrypt bool, ctrCipher *encrypt2.CtrCipher func assertReadAtFunc(t *testing.T, encrypt bool, ctrCipher *encrypt2.CtrCipher) func(off int64, r []byte, assertErr error, assertN int, assertString string, f io.ReaderAt) { return func(off int64, r []byte, assertErr error, assertN int, assertString string, f io.ReaderAt) { - var underlying io.ReaderAt = f + var underlying = f if encrypt { underlying = encrypt2.NewReader(underlying, ctrCipher) } diff --git a/util/tracing/util_test.go b/util/tracing/util_test.go index 7b54289041723..0e7760713803a 100644 --- a/util/tracing/util_test.go +++ b/util/tracing/util_test.go @@ -18,7 +18,7 @@ import ( "context" "testing" - basictracer "github.com/opentracing/basictracer-go" + "github.com/opentracing/basictracer-go" "github.com/opentracing/opentracing-go" "github.com/pingcap/tidb/util/tracing" "github.com/stretchr/testify/require"