chore: update math/rand to math/rand/v2

This commit is contained in:
nadoo committed 2025-02-28 00:40:20 +08:00
1 parent 8e81e09a8f
commit 6aee7b35c0
22 files changed
+75 -80

No files matched your search

+2 -2
View File
@@ -25,7 +25,7 @@ package ws
import (
"encoding/binary"
"io"
"math/rand"
"math/rand/v2"
"net"
"github.com/nadoo/glider/pkg/pool"
@@ -93,7 +93,7 @@ func (w *frameWriter) Write(b []byte) (int, error) {
defer pool.PutBuffer(payload)
// payload with mask
for i := 0; i < nPayload; i++ {
for i := range nPayload {
payload[i] = b[i] ^ w.maskKey[i%4]
}