Skip to content

Commit ba35c6d

Browse files
committed
lint
Signed-off-by: Anton Troshin <[email protected]>
1 parent ebd1cd3 commit ba35c6d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/runtime/compstore/subscriptions_index_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"testing"
1919

2020
rtpubsub "github.com/dapr/dapr/pkg/runtime/pubsub"
21+
2122
"github.com/stretchr/testify/assert"
2223
)
2324

@@ -43,10 +44,10 @@ func TestNextSubscriberIndex(t *testing.T) {
4344
ids := make(map[rtpubsub.ConnectionID]bool)
4445

4546
wg.Add(numGoroutines)
46-
for i := 0; i < numGoroutines; i++ {
47+
for range numGoroutines {
4748
go func() {
4849
defer wg.Done()
49-
for j := 0; j < numCallsPerGoroutine; j++ {
50+
for range numCallsPerGoroutine {
5051
id := store.NextSubscriberIndex()
5152
mu.Lock()
5253
ids[id] = true
@@ -59,7 +60,7 @@ func TestNextSubscriberIndex(t *testing.T) {
5960
assert.Len(t, ids, numGoroutines*numCallsPerGoroutine, "Expected all IDs to be unique")
6061

6162
for i := 1; i <= numGoroutines*numCallsPerGoroutine; i++ {
62-
assert.True(t, ids[rtpubsub.ConnectionID(i)], "Expected ID %d to be present", i)
63+
assert.True(t, ids[rtpubsub.ConnectionID(i)], "Expected ID %d to be present", i) //nolint:gosec
6364
}
6465
})
6566
}

0 commit comments

Comments
 (0)