mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
chore: update math/rand to math/rand/v2
This commit is contained in:
1 parent
8e81e09a8f
commit
6aee7b35c0
22 files changed
+75
-80
No files matched your search
+1
-1
@@ -179,7 +179,7 @@ func (c *Client) exchange(qname string, reqBytes []byte, preferTCP bool) (
|
||||
|
||||
ups := c.UpStream(qname)
|
||||
server = ups.Server()
|
||||
for i := 0; i < ups.Len(); i++ {
|
||||
for range ups.Len() {
|
||||
var rc net.Conn
|
||||
rc, err = dialer.Dial(network, server)
|
||||
if err != nil {
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ import (
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"io"
|
||||
"math/rand"
|
||||
"math/rand/v2"
|
||||
"net/netip"
|
||||
"strings"
|
||||
)
|
||||
@@ -146,7 +146,7 @@ func UnmarshalMessage(b []byte) (*Message, error) {
|
||||
|
||||
// resp answers
|
||||
rrIdx := HeaderLen + qLen
|
||||
for i := 0; i < int(m.Header.ANCOUNT); i++ {
|
||||
for range int(m.Header.ANCOUNT) {
|
||||
rr := &RR{}
|
||||
rrLen, err := m.UnmarshalRR(rrIdx, rr)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user