refactor: use strconv.Itoa instead of string(rune()) in test

Replace string(rune(i)) with strconv.Itoa(i) in hub_concurrency_test.go
for generating client IDs. While this is test code and not a production bug,
it uses the same incorrect pattern that caused the PR #575 bug.

This ensures consistent best practices across the codebase and avoids
confusion for developers who might copy this pattern.

Related: #575
This commit is contained in:
rcourtman 2025-10-20 15:12:14 +00:00
parent 8d6346a008
commit 6619dc803e

View file

@ -1,6 +1,7 @@
package websocket
import (
"strconv"
"sync"
"testing"
"time"
@ -24,7 +25,7 @@ func TestHubConcurrentClients(t *testing.T) {
client := &Client{
hub: hub,
send: make(chan []byte, 10),
id: "client-register-" + string(rune(i)),
id: "client-register-" + strconv.Itoa(i),
}
hub.register <- client
time.Sleep(time.Microsecond)