code: func (nc *Conn) makeTLSConn() error {
  	// Allow the user to configure their own tls.Config structure.
  	var tlsCopy *tls.Config
  	if nc.Opts.TLSConfig != nil {
  		tlsCopy = util.CloneTLSConfig(nc.Opts.TLSConfig)
  	} else {
  		tlsCopy = &tls.Config{}
  	}
  	// If its blank we will override it with the current host
  	if tlsCopy.ServerName == _EMPTY_ {
  		if nc.current.tlsName != _EMPTY_ {
  			tlsCopy.ServerName = nc.current.tlsName
  		} else {
  			h, _, _ := net.SplitHostPort(nc.current.url.Host)
  			tlsCopy.ServerName = h
  		}
  	}
  	nc.conn = tls.Client(nc.conn, tlsCopy)
  	conn := nc.conn.(*tls.Conn)
  	if err := conn.Handshake(); err != nil {
  		return err
  	}
  	nc.bw = nc.newBuffer()
  	return nil
  }
docs: // makeTLSConn will wrap an existing Conn using TLS