32 lines · 573 B · Go
RawDownload
package api import (	"bufio"	"crypto/tls"	"net") type bufferedConn struct {	net.Conn	reader *bufio.Reader} func (c *bufferedConn) Read(p []byte) (int, error) {	if c == nil {		return 0, net.ErrClosed	}	if c.reader == nil {		return c.Conn.Read(p)	}	return c.reader.Read(p)} func (c *bufferedConn) ConnectionState() tls.ConnectionState {	if c == nil || c.Conn == nil {		return tls.ConnectionState{}	}	if stater, ok := c.Conn.(interface{ ConnectionState() tls.ConnectionState }); ok {		return stater.ConnectionState()	}	return tls.ConnectionState{}}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t