code: func (nc *Conn) addURLToPool(sURL string, implicit, saveTLSName bool) error {
  	if !strings.Contains(sURL, "://") {
  		sURL = fmt.Sprintf("%s://%s", nc.connScheme(), sURL)
  	}
  	var (
  		u   *url.URL
  		err error
  	)
  	for i := 0; i < 2; i++ {
  		u, err = url.Parse(sURL)
  		if err != nil {
  			return err
  		}
  		if u.Port() != "" {
  			break
  		}
  		// In case given URL is of the form "localhost:", just add
  		// the port number at the end, otherwise, add ":4222".
  		if sURL[len(sURL)-1] != ':' {
  			sURL += ":"
  		}
  		sURL += defaultPortString
  	}
  
  	var tlsName string
  	if implicit {
  		curl := nc.current.url
  		// Check to see if we do not have a url.User but current connected
  		// url does. If so copy over.
  		if u.User == nil && curl.User != nil {
  			u.User = curl.User
  		}
  		// We are checking to see if we have a secure connection and are
  		// adding an implicit server that just has an IP. If so we will remember
  		// the current hostname we are connected to.
  		if saveTLSName && hostIsIP(u) {
  			tlsName = curl.Hostname()
  		}
  	}
  
  	s := &srv{url: u, isImplicit: implicit, tlsName: tlsName}
  	nc.srvPool = append(nc.srvPool, s)
  	nc.urls[u.Host] = struct{}{}
  	return nil
  }
docs: // addURLToPool adds an entry to the server pool