code: func fixupAddresses(remote net.IP, addresses []string) []string {
  	fixed := make([]string, 0, len(addresses))
  	for _, annAddr := range addresses {
  		uri, err := url.Parse(annAddr)
  		if err != nil {
  			continue
  		}
  
  		host, port, err := net.SplitHostPort(uri.Host)
  		if err != nil {
  			continue
  		}
  
  		ip := net.ParseIP(host)
  
  		// Some classes of IP are no-go.
  		if ip.IsLoopback() || ip.IsMulticast() {
  			continue
  		}
  
  		if host == "" || ip.IsUnspecified() {
  			// Replace the unspecified IP with the request source.
  
  			// ... unless the request source is the loopback address or
  			// multicast/unspecified (can't happen, really).
  			if remote.IsLoopback() || remote.IsMulticast() || remote.IsUnspecified() {
  				continue
  			}
  
  			// Do not use IPv6 remote address if requested scheme is ...4
  			// (i.e., tcp4, etc.)
  			if strings.HasSuffix(uri.Scheme, "4") && remote.To4() == nil {
  				continue
  			}
  
  			// Do not use IPv4 remote address if requested scheme is ...6
  			if strings.HasSuffix(uri.Scheme, "6") && remote.To4() != nil {
  				continue
  			}
  
  			host = remote.String()
  		}
  
  		uri.Host = net.JoinHostPort(host, port)
  		fixed = append(fixed, uri.String())
  	}
  
  	return fixed
  }
docs: // fixupAddresses checks the list of addresses, removing invalid ones and
  // replacing unspecified IPs with the given remote IP.