Skip to content

Commit c0ab781

Browse files
authored
chore: fix staticcheck (#2631)
1 parent 50f04c1 commit c0ab781

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

commands_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ var _ = Describe("Commands", func() {
612612
// if too much time (>1s) is used during command execution, it may also cause the test to fail.
613613
// so the ObjectIdleTime result should be <=now-start+1s
614614
// link: https://github.com/redis/redis/blob/5b48d900498c85bbf4772c1d466c214439888115/src/object.c#L1265-L1272
615-
Expect(idleTime.Val()).To(BeNumerically("<=", time.Now().Sub(start)+time.Second))
615+
Expect(idleTime.Val()).To(BeNumerically("<=", time.Since(start)+time.Second))
616616
})
617617

618618
It("should Persist", func() {

internal/proto/reader_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func TestReader_ReadLine(t *testing.T) {
7878
t.Errorf("Should be able to read the full buffer: %v", err)
7979
}
8080

81-
if bytes.Compare(read, original[:len(original)-2]) != 0 {
81+
if !bytes.Equal(read, original[:len(original)-2]) {
8282
t.Errorf("Values must be equal: %d expected %d", len(read), len(original[:len(original)-2]))
8383
}
8484
}

0 commit comments

Comments
 (0)