code: func CreateTLSConfig(remoteCAs *x509.CertPool, cert *tls.Certificate) *tls.Config {
  	var certs []tls.Certificate
  	if cert != nil {
  		certs = []tls.Certificate{*cert}
  	}
  	return &tls.Config{
  		Certificates: certs,
  		RootCAs:      remoteCAs,
  	}
  }
docs: // CreateTLSConfig creates a tls.Config object from certs and roots