go/src/net/lookup_test.go

var goResolver

func hasSuffixFold(s, suffix string) bool {}

func lookupLocalhost(ctx context.Context, fn func(context.Context, string, string) ([]IPAddr, error), network, host string) ([]IPAddr, error) {}

var lookupGoogleSRVTests

var backoffDuration

func TestLookupGoogleSRV(t *testing.T) {}

var lookupGmailMXTests

func TestLookupGmailMX(t *testing.T) {}

var lookupGmailNSTests

func TestLookupGmailNS(t *testing.T) {}

var lookupGmailTXTTests

func TestLookupGmailTXT(t *testing.T) {}

var lookupGooglePublicDNSAddrTests

func TestLookupGooglePublicDNSAddr(t *testing.T) {}

func TestLookupIPv6LinkLocalAddr(t *testing.T) {}

func TestLookupIPv6LinkLocalAddrWithZone(t *testing.T) {}

var lookupCNAMETests

func TestLookupCNAME(t *testing.T) {}

var lookupGoogleHostTests

func TestLookupGoogleHost(t *testing.T) {}

func TestLookupLongTXT(t *testing.T) {}

var lookupGoogleIPTests

func TestLookupGoogleIP(t *testing.T) {}

var revAddrTests

func TestReverseAddress(t *testing.T) {}

func TestDNSFlood(t *testing.T) {}

func TestLookupDotsWithLocalSource(t *testing.T) {}

func TestLookupDotsWithRemoteSource(t *testing.T) {}

func testDots(t *testing.T, mode string) {}

func mxString(mxs []*MX) string {}

func nsString(nss []*NS) string {}

func srvString(srvs []*SRV) string {}

func TestLookupPort(t *testing.T) {}

// Like TestLookupPort but with minimal tests that should always pass
// because the answers are baked-in to the net package.
func TestLookupPort_Minimal(t *testing.T) {}

func TestLookupProtocol_Minimal(t *testing.T) {}

func TestLookupNonLDH(t *testing.T) {}

func TestLookupContextCancel(t *testing.T) {}

// Issue 24330: treat the nil *Resolver like a zero value. Verify nothing
// crashes if nil is used.
func TestNilResolverLookup(t *testing.T) {}

// TestLookupHostCancel verifies that lookup works even after many
// canceled lookups (see golang.org/issue/24178 for details).
func TestLookupHostCancel(t *testing.T) {}

type lookupCustomResolver

func (lcr *lookupCustomResolver) dial() func(ctx context.Context, network, address string) (Conn, error) {}

// TestConcurrentPreferGoResolversDial tests that multiple resolvers with the
// PreferGo option used concurrently are all dialed properly.
func TestConcurrentPreferGoResolversDial(t *testing.T) {}

var ipVersionTests

func TestIPVersion(t *testing.T) {}

// Issue 28600: The context that is used to lookup ips should always
// preserve the values from the context that was passed into LookupIPAddr.
func TestLookupIPAddrPreservesContextValues(t *testing.T) {}

// Issue 30521: The lookup group should call the resolver for each network.
func TestLookupIPAddrConcurrentCallsForNetworks(t *testing.T) {}

// Issue 53995: Resolver.LookupIP should return error for empty host name.
func TestResolverLookupIPWithEmptyHost(t *testing.T) {}

func TestWithUnexpiredValuesPreserved(t *testing.T) {}

// Issue 31597: don't panic on null byte in name
func TestLookupNullByte(t *testing.T) {}

func TestResolverLookupIP(t *testing.T) {}

// A context timeout should still return a DNSError.
func TestDNSTimeout(t *testing.T) {}

func TestLookupNoData(t *testing.T) {}

func testLookupNoData(t *testing.T, prefix string) {}

func TestLookupPortNotFound(t *testing.T) {}

var tcpOnlyService

func TestLookupPortDifferentNetwork(t *testing.T) {}

func TestLookupPortEmptyNetworkString(t *testing.T) {}

func TestLookupPortIPNetworkString(t *testing.T) {}

func TestLookupNoSuchHost(t *testing.T) {}

func TestDNSErrorUnwrap(t *testing.T) {}