func (r *Resolver) GetHostByName(name string, preferIPv6 bool) (ipList []net.IP, redirects rr.RRs, err error) {
	a, b := (*Resolver).GetHostByNameIPv4, (*Resolver).GetHostByNameIPv6
	if preferIPv6 {
		a, b = b, a
	}

	if ipList, redirects, err = a(r, name); len(ipList) != 0 {
		return
	}

	return b(r, name)
}
// GetHostByName will try to Lookup an IN A or AAAA address (i.e. IPv4 or IPv6)
// list for name.  Used CNAMEs chain, if any, is returned in redirects.
// Initially an attempt for IPv4 addresses is performed. Query for the IPv6
// addresses is afterwards invoked iff no IPv4 addresses were returned by the
// initial attempt. If preferIPv6 == true then the above query order is
// reversed.
GetHostByName will try to Lookup an IN A or AAAA address
list for name.  Used CNAMEs chain, if any, is returned in redirects.
Initially an attempt for IPv4 addresses is performed. Query for the IPv6
addresses is afterwards invoked iff no IPv4 addresses were returned by the
initial attempt. If preferIPv6 == true then the above query order is
reversed.
// GetHostByName will try to Lookup an IN A or AAAA address ( i . e . IPv4 or IPv6 ) // list for name . Used CNAMEs chain if any is returned in redirects . // Initially an attempt for IPv4 addresses is performed . Query for the IPv6 // addresses is afterwards invoked iff no IPv4 addresses were returned by the // initial attempt . If preferIPv6 == true then the above query order is // reversed .
func (r *Resolver) GetHostByName(name string, preferIPv6 bool) (ipList []net.IP, redirects rr.RRs, err error) {
	a, b := (*Resolver).GetHostByNameIPv4, (*Resolver).GetHostByNameIPv6
	if preferIPv6 {
		a, b = b, a
	}
	if ipList, redirects, err = a(r, name); len(ipList) != 0 {
		return
	}
	return b(r, name)
}
func ( r * Resolver ) GetHostByName ( name string , preferIPv6 bool ) ( ipList [ ] net . IP , redirects rr . RRs , err error ) { a , b := ( * Resolver ) . GetHostByNameIPv4 , ( * Resolver ) . GetHostByNameIPv6 if preferIPv6 { a , b = b , a } if ipList , redirects , err = a ( r , name ) ; len ( ipList ) != 0 { return } return b ( r , name ) }
GetHostByName will try to Lookup an IN A or AAAA address
list for name.
GetHostByName will try to Lookup an IN A or AAAA address list for name .