Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyBytes = []byte{}
EmptyBytes is an byte slice with length 0, but not equal to nil.
View Source
var ZeroByteReader = NewByteReader(0)
ZeroByteReader is an byteReader that returns unlimited zero bytes.
os.Open("/dev/zero") returns a similar byteReader.
Functions ¶
func CatchError ¶
func CatchError(errp *error)
func FirstError ¶
FirstError returns first no nil error from given errors.
Types ¶
type ByteReader ¶
type ByteReader interface { io.Reader io.ByteReader }
func NewByteReader ¶
func NewByteReader(c byte) ByteReader
NewByteReader creates an ByteReader that returns unlimited bytes with value c.
Click to show internal directories.
Click to hide internal directories.