code: func (dnsClient *DNSClientImpl) LookupHost(ctx context.Context, hostname string) ([]net.IP, error) {
  	var recordsA, recordsAAAA []dns.RR
  	var errA, errAAAA error
  	var wg sync.WaitGroup
  
  	wg.Add(1)
  	go func() {
  		defer wg.Done()
  		recordsA, errA = dnsClient.lookupIP(ctx, hostname, dns.TypeA)
  	}()
  	wg.Add(1)
  	go func() {
  		defer wg.Done()
  		recordsAAAA, errAAAA = dnsClient.lookupIP(ctx, hostname, dns.TypeAAAA)
  	}()
  	wg.Wait()
  
  	if errA != nil && errAAAA != nil {
  		return nil, errA
  	}
  
  	var addrs []net.IP
  
  	for _, answer := range recordsA {
  		if answer.Header().Rrtype == dns.TypeA {
  			if a, ok := answer.(*dns.A); ok && a.A.To4() != nil && (!isPrivateV4(a.A) || dnsClient.allowRestrictedAddresses) {
  				addrs = append(addrs, a.A)
  			}
  		}
  	}
  	for _, answer := range recordsAAAA {
  		if answer.Header().Rrtype == dns.TypeAAAA {
  			if aaaa, ok := answer.(*dns.AAAA); ok && aaaa.AAAA.To16() != nil && (!isPrivateV6(aaaa.AAAA) || dnsClient.allowRestrictedAddresses) {
  				addrs = append(addrs, aaaa.AAAA)
  			}
  		}
  	}
  
  	return addrs, nil
  }
docs: // LookupHost sends a DNS query to find all A and AAAA records associated with
  // the provided hostname. This method assumes that the external resolver will
  // chase CNAME/DNAME aliases and return relevant records.  It will retry
  // requests in the case of temporary network errors. It can return net package,
  // context.Canceled, and context.DeadlineExceeded errors, all wrapped in the
  // DNSError type.