Documentation
¶
Index ¶
- func Assert(err error, msg ...interface{})
- func AssertBytes(b []byte, err error) []byte
- func AssertIf(exp bool, msg string, args ...interface{})
- func AssertLength(n int, err error) int
- func AssertLong(n int64, err error) int64
- func CountOf(buffs [][]byte) (n int64)
- func MustToBytes(message interface{}) []byte
- func MustToReader(message interface{}) io.Reader
- func StealBytes(reader io.WriterTo) ([]byte, error)
- func ToBytes(message interface{}) ([]byte, error)
- func ToReader(message interface{}) (io.Reader, error)
- type ByteReader
- type ByteStealer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustToReader ¶
MustToReader any error to panic
Types ¶
type ByteReader ¶
type ByteReader interface { io.Reader io.ByteReader }
ByteReader defines byte reader
func NewByteReader ¶
func NewByteReader(r io.Reader) ByteReader
NewByteReader create a ByteReader from io.Reader
type ByteStealer ¶ added in v1.4.0
type ByteStealer struct {
Data []byte
}
ByteStealer steal from io.Reader
Click to show internal directories.
Click to hide internal directories.