Skip to content

Commit c710e34

Browse files
committed
[lint] minor fixes
1 parent b31038a commit c710e34

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/cache/memory_bench_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func BenchmarkMemoryCache_Cleanup(b *testing.B) {
122122
ctx := context.Background()
123123

124124
// Pre-populate cache with many items
125-
for i := 0; i < 1000; i++ {
125+
for i := range 1000 {
126126
key := "item-" + strconv.Itoa(i)
127127
value := "value-" + strconv.Itoa(i)
128128
cache.Set(ctx, key, []byte(value))

pkg/cache/memory_concurrency_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ func TestMemoryCache_ConcurrentGetAndDelete(t *testing.T) {
387387
wg.Wait()
388388

389389
// All items should be deleted
390-
for i := 0; i < numGoroutines*attemptsPerGoroutine; i++ {
390+
for i := range numGoroutines * attemptsPerGoroutine {
391391
key := "item-" + strconv.Itoa(i)
392392
_, err := c.Get(ctx, key)
393393
if !errors.Is(err, cache.ErrKeyNotFound) {

0 commit comments

Comments
 (0)