func netListener(addr string) (net.Listener, error) {
	addrParts := strings.SplitN(addr, ":", 2)
	if len(addrParts) == 2 && addrParts[0] == "unix" {
		return net.Listen("unix", addrParts[1])
	}
	return net.Listen("tcp", addr)
}
// netListener creates net.Listener for tcp and unix domains:
// if addr is is in the form "unix:/run/tinode.sock" it's a unix socket, otherwise TCP host:port.
netListener creates net.Listener for tcp and unix domains:
if addr is is in the form "unix:/run/tinode.sock" it's a unix socket, otherwise TCP host:port.
// netListener creates net . Listener for tcp and unix domains : // if addr is is in the form " unix : / run / tinode . sock " it ' s a unix socket otherwise TCP host : port .
func netListener(addr string) (net.Listener, error) {
	addrParts := strings.SplitN(addr, ":", 2)
	if len(addrParts) == 2 && addrParts[0] == "unix" {
		return net.Listen("unix", addrParts[1])
	}
	return net.Listen("tcp", addr)
}
func netListener ( addr string ) ( net . Listener , error ) { addrParts := strings . SplitN ( addr , " " , 2 ) if len ( addrParts ) == 2 && addrParts [ 0 ] == " " { return net . Listen ( " " , addrParts [ 1 ] ) } return net . Listen ( " " , addr ) }
netListener creates net.Listener for tcp and unix domains:
if addr is is in the form "unix:/run/tinode.sock" it's a unix socket, otherwise TCP host:port.
netListener creates net . Listener for tcp and unix domains : if addr is is in the form " unix : / run / tinode . sock " it ' s a unix socket otherwise TCP host : port .