func (l *Listener) Listen(network, address string) (conn net.Listener, err error) {
	l.mux.Lock()
	defer l.mux.Unlock()
	if l.conn != nil {
		err = fmt.Errorf("%s:%s already in use", l.network, l.address)
		return
	}
	l.network = network
	l.address = address
	conn, err = net.Listen(network, address)
	if err == nil {
		l.conn = conn
	}
	return
}
Listen announces on the local network address.

The network must be "tcp", "tcp4", "tcp6", "unix" or "unixpacket".

For TCP networks, if the host in the address parameter is empty or
a literal unspecified IP address, Listen listens on all available
unicast and anycast IP addresses of the local system.
To only use IPv4, use network "tcp4".
The address can use a host name, but this is not recommended,
because it will create a listener for at most one of the host's IP
addresses.
If the port in the address parameter is empty or "0", as in
"127.0.0.1:" or "[::1]:0", a port number is automatically chosen.
The Addr method of Listener can be used to discover the chosen
port.

See func Dial for a description of the network and address
parameters.
package listeners
import (
	"crypto/tls"
	"fmt"
	"io"
	"net"
	"net/http"
	"strings"
	"sync"
	"github.com/dolab/gogo/pkgs/hooks"
)
type Listener struct {
	http2  bool
	tlscfg *tls.Config
	mux     sync.RWMutex
	network string
	address string
	conn    io.Closer
}
func New(isHTTP2 bool) Interface {
	return &Listener{
		http2: isHTTP2,
	}
}
func (l *Listener) WithTLSConfig(cfg *tls.Config) Interface {
	l.mux.Lock()
	l.tlscfg = cfg
	l.mux.Unlock()
	return l
}