// NewDNSResolverImpl constructs a new DNS resolver object that utilizes the // provided list of DNS servers for resolution. func NewDNSResolverImpl(dialTimeout time.Duration, servers []string) *DNSResolverImpl { dnsClient := new(dns.Client) // Set timeout for underlying net.Conn dnsClient.DialTimeout = dialTimeout return &DNSResolverImpl{DNSClient: dnsClient, Servers: servers} }
// NewDNSResolverImpl constructs a new DNS resolver object that utilizes the // provided list of DNS servers for resolution. func NewDNSResolverImpl(dialTimeout time.Duration, servers []string) *DNSResolverImpl { dnsClient := new(dns.Client) // Set timeout for underlying net.Conn dnsClient.DialTimeout = dialTimeout dnsClient.Net = "tcp" return &DNSResolverImpl{ DNSClient: dnsClient, Servers: servers, allowRestrictedAddresses: false, } }