Documentation
¶
Index ¶
- func Bytes2Hex(d []byte) string
- func BytesSlice2HexSlice(d [][]byte) []string
- func CopyBytes(b []byte) (copiedBytes []byte)
- func Decode(data []byte, dec Decoder) (interface{}, error)
- func Encode(s interface{}, enc Encoder) ([]byte, error)
- func Equal(a []byte, b []byte) bool
- func FromHex(s string) ([]byte, error)
- func FromInt16(v int16) []byte
- func FromInt32(v int32) []byte
- func FromInt64(v int64) []byte
- func FromUint16(v uint16) []byte
- func FromUint32(v uint32) []byte
- func FromUint64(v uint64) []byte
- func HasHexPrefix(str string) bool
- func Hex2Bytes(str string) ([]byte, error)
- func HexSlice2BytesSlice(ss []string) ([][]byte, error)
- func Int16(data []byte) int16
- func Int32(data []byte) int32
- func Int64(data []byte) int64
- func IsHex(str string) bool
- func LeftPadBytes(slice []byte, l int) []byte
- func RightPadBytes(slice []byte, l int) []byte
- func ToHex(b []byte) string
- func Uint16(data []byte) uint16
- func Uint32(data []byte) uint32
- func Uint64(data []byte) uint64
- type Decoder
- type Encoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesSlice2HexSlice ¶
BytesSlice2HexSlice encodes bytes slice and returns hex string slice without '0x' prefix
func HasHexPrefix ¶
HasHexPrefix checks if hex string has '0x' or '0X' prefix
func HexSlice2BytesSlice ¶
HexSlice2BytesSlice decodes hex string slice without '0x' prefix and returns bytes slice
func LeftPadBytes ¶
LeftPadBytes adds padding in left side
func RightPadBytes ¶
RightPadBytes adds padding in right side
Types ¶
Click to show internal directories.
Click to hide internal directories.