func (l *TestListener) Dial(context.Context, string, string) (net.Conn, error) {
	l.connMu.Lock()
	defer l.connMu.Unlock()
	if l.conn != nil {
		return nil, errors.New("Dial() has already been called on this TestListener")
	}

	// Initialize logging pipe
	p := newLoggingPipe()
	l.conn = p.serverConn()

	// send serverConn to Accept() and close l.connCh (so future callers to
	// Accept() get nothing)
	l.connCh <- p.serverConn()
	close(l.connCh)
	return p.clientConn(), nil
}
func (l *TestListener) Dial(context.Context, string, string) (net.Conn, error) {
	l.connMu.Lock()
	defer l.connMu.Unlock()
	if l.conn != nil {
		return nil, errors.New("Dial() has already been called on this TestListener")
	}

	
	p := newLoggingPipe()
	l.conn = p.serverConn()

	
	
	l.connCh <- p.serverConn()
	close(l.connCh)
	return p.clientConn(), nil
}
func ( l * TestListener ) Dial ( context . Context , string , string ) ( net . Conn , error ) { l . connMu . Lock ( ) defer l . connMu . Unlock ( ) if l . conn != nil { return nil , errors . New ( " " ) } // Initialize logging pipe p := newLoggingPipe ( ) l . conn = p . serverConn ( ) // send serverConn to Accept() and close l.connCh (so future callers to // Accept() get nothing) l . connCh <- p . serverConn ( ) close ( l . connCh ) return p . clientConn ( ) , nil }
// Dial initializes a new connection and releases a blocked call to Accept()
Dial initializes a new connection and releases a blocked call to Accept ()