func TLSListeners(unsetEnv bool, tlsConfig *tls.Config) ([]net.Listener, error) {
	listeners, err := Listeners(unsetEnv)
	if listeners == nil || err != nil {
		return nil, err
	}
	if tlsConfig != nil && err == nil {
		for i, l := range listeners {
			if l.Addr().Network() == "tcp" {
				listeners[i] = tls.NewListener(l, tlsConfig)
			}
		}
	}
	return listeners, err
}
TLSListeners returns a slice containing a net.listener for each matching TCP socket type
passed to this process.
It uses default Listeners func and forces TCP sockets handlers to use TLS based on tlsConfig.
package activation
import (
	"crypto/tls"
	"net"
)
func Listeners(unsetEnv bool) ([]net.Listener, error) {
	files := Files(unsetEnv)
	listeners := make([]net.Listener, len(files))
	for i, f := range files {
		if pc, err := net.FileListener(f); err == nil {
			listeners[i] = pc
		}
	}
	return listeners, nil
}