code: func DialConfig(url string, config Config) (*Connection, error) {
  	var err error
  	var conn net.Conn
  
  	uri, err := ParseURI(url)
  	if err != nil {
  		return nil, err
  	}
  
  	if config.SASL == nil {
  		config.SASL = []Authentication{uri.PlainAuth()}
  	}
  
  	if config.Vhost == "" {
  		config.Vhost = uri.Vhost
  	}
  
  	addr := net.JoinHostPort(uri.Host, strconv.FormatInt(int64(uri.Port), 10))
  
  	dialer := config.Dial
  	if dialer == nil {
  		dialer = DefaultDial(defaultConnectionTimeout)
  	}
  
  	conn, err = dialer("tcp", addr)
  	if err != nil {
  		return nil, err
  	}
  
  	if uri.Scheme == "amqps" {
  		if config.TLSClientConfig == nil {
  			config.TLSClientConfig = new(tls.Config)
  		}
  
  		// If ServerName has not been specified in TLSClientConfig,
  		// set it to the URI host used for this connection.
  		if config.TLSClientConfig.ServerName == "" {
  			config.TLSClientConfig.ServerName = uri.Host
  		}
  
  		client := tls.Client(conn, config.TLSClientConfig)
  		if err := client.Handshake(); err != nil {
  
  			conn.Close()
  			return nil, err
  		}
  
  		conn = client
  	}
  
  	return Open(conn, config)
  }
docs: // DialConfig accepts a string in the AMQP URI format and a configuration for
  // the transport and connection setup, returning a new Connection.  Defaults to
  // a server heartbeat interval of 10 seconds and sets the initial read deadline
  // to 30 seconds.