code: func (c *Certificates) CreateTLSConfig(entryPointName string) (*tls.Config, error) {
  	config := &tls.Config{}
  	domainsCertificates := make(map[string]map[string]*tls.Certificate)
  
  	if c.isEmpty() {
  		config.Certificates = []tls.Certificate{}
  
  		cert, err := generate.DefaultCertificate()
  		if err != nil {
  			return nil, err
  		}
  
  		config.Certificates = append(config.Certificates, *cert)
  	} else {
  		for _, certificate := range *c {
  			err := certificate.AppendCertificate(domainsCertificates, entryPointName)
  			if err != nil {
  				log.Errorf("Unable to add a certificate to the entryPoint %q : %v", entryPointName, err)
  				continue
  			}
  
  			for _, certDom := range domainsCertificates {
  				for _, cert := range certDom {
  					config.Certificates = append(config.Certificates, *cert)
  				}
  			}
  		}
  	}
  	return config, nil
  }
docs: // CreateTLSConfig creates a TLS config from Certificate structures