func newTLSConfig(certPath, keyPath string) (*tls.Config, error) {
	cert, err := loadX509KeyPair(certPath, keyPath)
	if err != nil {
		return nil, fmt.Errorf("could not load TLS cert: %s", err)
	}

	return &tls.Config{Certificates: []tls.Certificate{cert}}, nil
}
// NewTLSConfig returns a TLS config that includes a certificate
// Use for server TLS config or when using a client certificate
// If caPath is empty, system CAs will be used
NewTLSConfig returns a TLS config that includes a certificate
Use for server TLS config or when using a client certificate
If caPath is empty, system CAs will be used
// NewTLSConfig returns a TLS config that includes a certificate // Use for server TLS config or when using a client certificate // If caPath is empty system CAs will be used
func newTLSConfig(certPath, keyPath string) (*tls.Config, error) {
	cert, err := loadX509KeyPair(certPath, keyPath)
	if err != nil {
		return nil, fmt.Errorf("could not load TLS cert: %s", err)
	}
	return &tls.Config{Certificates: []tls.Certificate{cert}}, nil
}
func newTLSConfig ( certPath , keyPath string ) ( * tls . Config , error ) { cert , err := loadX509KeyPair ( certPath , keyPath ) if err != nil { return nil , fmt . Errorf ( " " , err ) } return & tls . Config { Certificates : [ ] tls . Certificate { cert } } , nil }
NewTLSConfig returns a TLS config that includes a certificate
Use for server TLS config or when using a client certificate
If caPath is empty, system CAs will be used
NewTLSConfig returns a TLS config that includes a certificate Use for server TLS config or when using a client certificate If caPath is empty system CAs will be used