Documentation
¶
Index ¶
- Variables
- func BoolToBytes(dst []byte, val any, _ ...any) ([]byte, error)
- func BytesToBytes(dst []byte, val any, _ ...any) ([]byte, error)
- func FloatToBytes(dst []byte, val any, _ ...any) ([]byte, error)
- func IntToBytes(dst []byte, val any, _ ...any) ([]byte, error)
- func RegisterToBytesFn(fn ToBytesFn)
- func StrToBytes(dst []byte, val any, _ ...any) ([]byte, error)
- func ToBytes(dst []byte, val any, args ...any) ([]byte, error)
- func UintToBytes(dst []byte, val any, _ ...any) ([]byte, error)
- type ToBytesFn
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnknownType = errors.New("unknown type")
)
Functions ¶
func BoolToBytes ¶
BoolToBytes converts from boolean.
func BytesToBytes ¶
BytesToBytes converts from byte array.
func FloatToBytes ¶
FloatToBytes converts from float (32 and 64 bits).
func IntToBytes ¶
IntToBytes converts from int (including int8, int16, ...).
func RegisterToBytesFn ¶
func RegisterToBytesFn(fn ToBytesFn)
RegisterToBytesFn registers new conversion function.
func StrToBytes ¶
StrToBytes converts from string.
Types ¶
Click to show internal directories.
Click to hide internal directories.