common

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2023 License: GPL-3.0 Imports: 5 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyBuffer

func CopyBuffer(dst io.Writer, src io.Reader, buf []byte) (written int64, err error)

func Must

func Must(err error)

func Must2

func Must2(_ interface{}, err error)

Types

type BufferdConn

type BufferdConn struct {
	net.Conn
	Br *bufio.Reader
}

func (*BufferdConn) Read

func (c *BufferdConn) Read(b []byte) (int, error)

type Error

type Error struct {
	// contains filtered or unexported fields
}

func NewError

func NewError(info string) *Error

func (*Error) Base

func (e *Error) Base(err error) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) String

func (e *Error) String() string

type RewindConn

type RewindConn struct {
	net.Conn
	*RewindReader
}

func NewRewindConn

func NewRewindConn(conn net.Conn) *RewindConn

func (*RewindConn) Read

func (c *RewindConn) Read(p []byte) (int, error)

type RewindReader

type RewindReader struct {
	// contains filtered or unexported fields
}

func (*RewindReader) Discard

func (r *RewindReader) Discard(n int) (int, error)

func (*RewindReader) Read

func (r *RewindReader) Read(p []byte) (int, error)

func (*RewindReader) ReadByte

func (r *RewindReader) ReadByte() (byte, error)

func (*RewindReader) Rewind

func (r *RewindReader) Rewind()

func (*RewindReader) SetBufferSize

func (r *RewindReader) SetBufferSize(size int)

func (*RewindReader) StopBuffering

func (r *RewindReader) StopBuffering()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL