1
0
mirror of https://github.com/golang/go synced 2024-11-13 12:40:26 -07:00

move goResolver

Change-Id: I6bbe3a3efa2072a770261e13adc396f95b1c21d4
This commit is contained in:
Mateusz Poliwczak 2024-04-13 08:27:14 +02:00
parent 3643528a65
commit 8a8177b9af
2 changed files with 2 additions and 2 deletions

View File

@ -25,8 +25,6 @@ import (
"golang.org/x/net/dns/dnsmessage" "golang.org/x/net/dns/dnsmessage"
) )
var goResolver = Resolver{PreferGo: true}
// Test address from 192.0.2.0/24 block, reserved by RFC 5737 for documentation. // Test address from 192.0.2.0/24 block, reserved by RFC 5737 for documentation.
var TestAddr = [4]byte{0xc0, 0x00, 0x02, 0x01} var TestAddr = [4]byte{0xc0, 0x00, 0x02, 0x01}

View File

@ -20,6 +20,8 @@ import (
"time" "time"
) )
var goResolver = Resolver{PreferGo: true}
func hasSuffixFold(s, suffix string) bool { func hasSuffixFold(s, suffix string) bool {
return strings.HasSuffix(strings.ToLower(s), strings.ToLower(suffix)) return strings.HasSuffix(strings.ToLower(s), strings.ToLower(suffix))
} }