mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-25 20:03:12 +03:00
Remove ToString0[T] usage to fix golangci-lint
This commit is contained in:
@@ -13,10 +13,10 @@ import (
|
||||
N "github.com/sagernet/sing/common/network"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"golang.org/x/net/dns/dnsmessage"
|
||||
)
|
||||
|
||||
func TestClient(t *testing.T) {
|
||||
t.Parallel()
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
|
||||
client := dns.NewClient(option.DNSClientOptions{})
|
||||
dnsTransport := dns.NewTCPTransport(context.Background(), N.SystemDialer, log.NewNopLogger(), M.ParseSocksaddr("1.0.0.1:53"))
|
||||
@@ -31,15 +31,3 @@ func TestClient(t *testing.T) {
|
||||
require.NotEmpty(t, addresses, "no answers")
|
||||
cancel()
|
||||
}
|
||||
|
||||
func makeQuery() *dnsmessage.Message {
|
||||
message := &dnsmessage.Message{}
|
||||
message.Header.ID = 1
|
||||
message.Header.RecursionDesired = true
|
||||
message.Questions = append(message.Questions, dnsmessage.Question{
|
||||
Name: dnsmessage.MustNewName("google.com."),
|
||||
Type: dnsmessage.TypeA,
|
||||
Class: dnsmessage.ClassINET,
|
||||
})
|
||||
return message
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user