code: func (s *ChainService) addrStringToNetAddr(addr string) (net.Addr, error) {
  	host, strPort, err := net.SplitHostPort(addr)
  	if err != nil {
  		switch err.(type) {
  		case *net.AddrError:
  			host = addr
  			strPort = s.ChainParams().DefaultPort
  		default:
  			return nil, err
  		}
  	}
  
  	// Attempt to look up an IP address associated with the parsed host.
  	ips, err := s.nameResolver(host)
  	if err != nil {
  		return nil, err
  	}
  
  	if len(ips) == 0 {
  		return nil, fmt.Errorf("no addresses found for %s", host)
  	}
  
  	port, err := strconv.Atoi(strPort)
  	if err != nil {
  		return nil, err
  	}
  
  	return &net.TCPAddr{
  		IP:   ips[0],
  		Port: port,
  	}, nil
  }
docs: // addrStringToNetAddr takes an address in the form of 'host:port' or 'host'
  // and returns a net.Addr which maps to the original address with any host
  // names resolved to IP addresses and a default port added, if not specified,
  // from the ChainService's network parameters.