Documentation ¶
Index ¶
- func Diff(a, b []string) ([]string, []string)
- func IsClosedErr(err error) bool
- func Member(list []string, a string) bool
- func NewFileConn(file *os.File) net.Conn
- func Remove(ss []string, e string) []string
- func Unique(s []string) []string
- type FileConn
- func (f *FileConn) Close() error
- func (f *FileConn) LocalAddr() net.Addr
- func (f *FileConn) Read(b []byte) (n int, err error)
- func (f *FileConn) RemoteAddr() net.Addr
- func (f *FileConn) SetDeadline(t time.Time) error
- func (f *FileConn) SetReadDeadline(t time.Time) error
- func (f *FileConn) SetWriteDeadline(t time.Time) error
- func (f *FileConn) Write(b []byte) (n int, err error)
- type FileConnAddr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsClosedErr ¶ added in v0.11.1
IsClosedErr is a helper function to check for "already closed" errors, which are usually harmless but still show up in logs, code adapted from https://stackoverflow.com/questions/44974984/how-to-check-a-net-conn-is-closed
func NewFileConn ¶ added in v0.11.3
NewFileConn returns a wrapper that shows an os.File as a net.Conn.
Types ¶
type FileConn ¶ added in v0.11.3
type FileConn struct {
// contains filtered or unexported fields
}
func (*FileConn) RemoteAddr ¶ added in v0.11.3
func (*FileConn) SetReadDeadline ¶ added in v0.11.3
func (*FileConn) SetWriteDeadline ¶ added in v0.11.3
type FileConnAddr ¶ added in v0.11.3
func (*FileConnAddr) Network ¶ added in v0.11.3
func (s *FileConnAddr) Network() string
func (*FileConnAddr) String ¶ added in v0.11.3
func (s *FileConnAddr) String() string
Click to show internal directories.
Click to hide internal directories.