common

package
v2.2.8 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LeDecode

func LeDecode(b []byte, values ...any) error

func LeDecodeToBool

func LeDecodeToBool(b []byte) bool

func LeDecodeToFloat32

func LeDecodeToFloat32(b []byte) float32

func LeDecodeToFloat64

func LeDecodeToFloat64(b []byte) float64

func LeDecodeToInt

func LeDecodeToInt(b []byte) int

func LeDecodeToInt16

func LeDecodeToInt16(b []byte) int16

func LeDecodeToInt32

func LeDecodeToInt32(b []byte) int32

func LeDecodeToInt64

func LeDecodeToInt64(b []byte) int64

func LeDecodeToInt8

func LeDecodeToInt8(b []byte) int8

func LeDecodeToString

func LeDecodeToString(b []byte) string

func LeDecodeToUint

func LeDecodeToUint(b []byte) uint

func LeDecodeToUint16

func LeDecodeToUint16(b []byte) uint16

func LeDecodeToUint32

func LeDecodeToUint32(b []byte) uint32

func LeDecodeToUint64

func LeDecodeToUint64(b []byte) uint64

func LeDecodeToUint8

func LeDecodeToUint8(b []byte) uint8

func LeEncode

func LeEncode(values ...any) []byte

func LeEncodeBool

func LeEncodeBool(b bool) []byte

func LeEncodeByLength

func LeEncodeByLength(length int, values ...any) []byte

func LeEncodeFloat32

func LeEncodeFloat32(f float32) []byte

func LeEncodeFloat64

func LeEncodeFloat64(f float64) []byte

func LeEncodeInt

func LeEncodeInt(i int) []byte

func LeEncodeInt16

func LeEncodeInt16(i int16) []byte

func LeEncodeInt32

func LeEncodeInt32(i int32) []byte

func LeEncodeInt64

func LeEncodeInt64(i int64) []byte

func LeEncodeInt8

func LeEncodeInt8(i int8) []byte

func LeEncodeString

func LeEncodeString(s string) []byte

func LeEncodeUint

func LeEncodeUint(i uint) []byte

func LeEncodeUint16

func LeEncodeUint16(i uint16) []byte

func LeEncodeUint32

func LeEncodeUint32(i uint32) []byte

func LeEncodeUint64

func LeEncodeUint64(i uint64) []byte

func LeEncodeUint8

func LeEncodeUint8(i uint8) []byte

func LeFillUpSize

func LeFillUpSize(b []byte, l int) []byte

LeFillUpSize fills up the bytes `b` to given length `l` using LittleEndian.

Note that it creates a new bytes slice by copying the original one to avoid changing the original parameter bytes.

func ToBool

func ToBool(original any) bool

func ToBytes

func ToBytes(original any) []byte

func ToFloat32

func ToFloat32(original any) float32

Float32 converts `any` to float32.

func ToFloat64

func ToFloat64(original any) float64

Float64 converts `any` to float64.

func ToInt

func ToInt(original any) int

func ToInt16

func ToInt16(original any) int16

Int16 converts `any` to int16.

func ToInt32

func ToInt32(original any) int32

func ToInt64

func ToInt64(original any) int64

func ToInt8

func ToInt8(original any) int8

Int8 converts `any` to int8.

func ToString

func ToString(original any) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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