diff --git a/doctests/cmds_hash_test.go b/doctests/cmds_hash_test.go index 8a4fdec42c..7241bca4a9 100644 --- a/doctests/cmds_hash_test.go +++ b/doctests/cmds_hash_test.go @@ -79,7 +79,7 @@ func ExampleClient_hset() { keys := make([]string, 0, len(res6)) - for key, _ := range res6 { + for key := range res6 { keys = append(keys, key) } @@ -186,7 +186,7 @@ func ExampleClient_hgetall() { keys := make([]string, 0, len(hGetAllResult2)) - for key, _ := range hGetAllResult2 { + for key := range hGetAllResult2 { keys = append(keys, key) } diff --git a/hset_benchmark_test.go b/hset_benchmark_test.go index df16343555..8d141f4193 100644 --- a/hset_benchmark_test.go +++ b/hset_benchmark_test.go @@ -86,7 +86,7 @@ func benchmarkHSETOperations(b *testing.B, rdb *redis.Client, ctx context.Contex b.Fatalf("HSET operation failed: %v", err) } } - totalTimes = append(totalTimes, time.Now().Sub(startTime)) + totalTimes = append(totalTimes, time.Since(startTime)) } // Stop the timer to calculate metrics @@ -164,7 +164,7 @@ func benchmarkHSETPipelined(b *testing.B, rdb *redis.Client, ctx context.Context if err != nil { b.Fatalf("Pipeline execution failed: %v", err) } - totalTimes = append(totalTimes, time.Now().Sub(startTime)) + totalTimes = append(totalTimes, time.Since(startTime)) } b.StopTimer() diff --git a/maintnotifications/e2e/utils_test.go b/maintnotifications/e2e/utils_test.go index a60fac89f5..0aef84de77 100644 --- a/maintnotifications/e2e/utils_test.go +++ b/maintnotifications/e2e/utils_test.go @@ -43,13 +43,6 @@ func containsSubstring(s, substr string) bool { return false } -func min(a, b int) int { - if a < b { - return a - } - return b -} - func printLog(group string, isError bool, format string, args ...interface{}) { _, filename, line, _ := runtime.Caller(2) filename = filepath.Base(filename)