code: func NewOutboundPeer(cfg *Config, addr string) (*Peer, error) {
  	p := newPeerBase(cfg, false)
  	p.addr = addr
  
  	host, portStr, err := net.SplitHostPort(addr)
  	if err != nil {
  		return nil, err
  	}
  
  	port, err := strconv.ParseUint(portStr, 10, 16)
  	if err != nil {
  		return nil, err
  	}
  
  	if cfg.HostToNetAddress != nil {
  		na, err := cfg.HostToNetAddress(host, uint16(port), 0)
  		if err != nil {
  			return nil, err
  		}
  		p.na = na
  	} else {
  		p.na = wire.NewNetAddressIPPort(net.ParseIP(host), uint16(port), 0)
  	}
  
  	return p, nil
  }
docs: // NewOutboundPeer returns a new outbound bitcoin peer.