code: func (va *ValidationAuthorityImpl) setupHTTPValidation(
  	ctx context.Context,
  	reqURL string,
  	target *httpValidationTarget) (*preresolvedDialer, core.ValidationRecord, error) {
  	if reqURL == "" {
  		return nil,
  			core.ValidationRecord{},
  			fmt.Errorf("reqURL can not be nil")
  	}
  	if target == nil {
  		// This is the only case where returning an empty validation record makes
  		// sense - we can't construct a better one, something has gone quite wrong.
  		return nil,
  			core.ValidationRecord{},
  			fmt.Errorf("httpValidationTarget can not be nil")
  	}
  
  	// Construct a base validation record with the validation target's
  	// information.
  	record := core.ValidationRecord{
  		Hostname:          target.host,
  		Port:              strconv.Itoa(target.port),
  		AddressesResolved: target.available,
  		URL:               reqURL,
  	}
  
  	// Get the target IP to build a preresolved dialer with
  	targetIP := target.ip()
  	if targetIP == nil {
  		return nil,
  			record,
  			fmt.Errorf(
  				"host %q has no IP addresses remaining to use",
  				target.host)
  	}
  	record.AddressUsed = targetIP
  
  	dialer := &preresolvedDialer{
  		ip:       targetIP,
  		port:     target.port,
  		hostname: target.host,
  		timeout:  va.singleDialTimeout,
  	}
  	return dialer, record, nil
  }
docs: // setupHTTPValidation sets up a preresolvedDialer and a validation record for
  // the given request URL and httpValidationTarget. If the req URL is empty, or
  // the validation target is nil or has no available IP addresses, an error will
  // be returned.