Skip to content

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
Signed-off-by: Ping Yu <[email protected]>
  • Loading branch information
pingyu committed Dec 2, 2023
1 parent 420a0bf commit 429254d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion br/pkg/backup/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ func (bc *Client) BackupRanges(
progressCallBack func(ProgressUnit),
) error {
init := time.Now()
defer log.Info("Backup Ranges", zap.Duration("take", time.Since(init)))
defer func() {
log.Info("Backup Ranges", zap.Duration("take", time.Since(init)))
}()

Check warning on line 255 in br/pkg/backup/client.go

View check run for this annotation

Codecov / codecov/patch

br/pkg/backup/client.go#L253-L255

Added lines #L253 - L255 were not covered by tests

if span := opentracing.SpanFromContext(ctx); span != nil && span.Tracer() != nil {
span1 := span.Tracer().StartSpan("Client.BackupRanges", opentracing.ChildOf(span.Context()))
Expand Down
2 changes: 1 addition & 1 deletion br/pkg/backup/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/jarcoal/httpmock"
. "github.com/pingcap/check"
. "github.com/pingcap/check" // nolint:revive
backuppb "github.com/pingcap/kvproto/pkg/brpb"
"github.com/pingcap/kvproto/pkg/errorpb"
"github.com/pingcap/kvproto/pkg/kvrpcpb"
Expand Down
2 changes: 1 addition & 1 deletion br/pkg/storage/s3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
backuppb "github.com/pingcap/kvproto/pkg/brpb"
"github.com/stretchr/testify/require"
"github.com/tikv/migration/br/pkg/mock"
. "github.com/tikv/migration/br/pkg/storage"
. "github.com/tikv/migration/br/pkg/storage" // nolint:revive
)

type s3Suite struct {
Expand Down

0 comments on commit 429254d

Please sign in to comment.