Documentation ¶
Index ¶
- Constants
- Variables
- func Append(dst []byte, delimiter []byte, data ...[]byte) []byte
- func Decode(d []byte, data interface{}) error
- func Decoder(values ...interface{}) herbdata.DataDecoder
- func Encode(data interface{}) ([]byte, error)
- func Encoder(values ...interface{}) herbdata.DataEncoder
- func Join(delimiter []byte, data ...[]byte) []byte
- func JoinStrings(data ...string) string
- func PackTo(w io.Writer, delimiter []byte, data ...[]byte) error
- func UnpackFrom(r io.Reader, delimiter []byte) ([]byte, error)
- func WriteLengthBytes(w io.Writer, length int) (int, error)
- func WriteTo(w io.Writer, delimiter []byte, data ...[]byte) (int, error)
Constants ¶
View Source
const PackLengthCodeNext2Byte = byte(254)
View Source
const PackLengthCodeNext4Byte = byte(253)
View Source
const PackLengthCodeNext8Byte = byte(252)
View Source
const PackLengthCodeNextByte = byte(255)
View Source
const PackLengthCodeReserved = byte(251)
Variables ¶
View Source
var DataFalse = byte(0)
View Source
var DataTrue = byte(1)
View Source
var DelimiterZero = []byte{0}
View Source
var ErrDataLengthNotMatch = errors.New("binary data length not match")
View Source
var ErrDataLengthOverflow = errors.New("binary data length overflow")
View Source
var ErrDataTypeNotSupported = errors.New("binary data type not supported")
View Source
var ErrUnpackDataFail = errors.New("unpack binary data fail")
Functions ¶
func Decoder ¶
func Decoder(values ...interface{}) herbdata.DataDecoder
func Encoder ¶
func Encoder(values ...interface{}) herbdata.DataEncoder
func JoinStrings ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.