Documentation ¶
Overview ¶
Package convert provides helper functions to convert data between various types, e.g. []byte to int, etc.
Index ¶
- func IPByteSlice(ip string) []byte
- func Int64Byte(data int64) (ret []byte)
- func Reverse(data []byte) []byte
- func Uint16(data []byte) (ret uint16)
- func Uint16Byte(data uint16) (ret []byte)
- func Uint16b(data []byte) (ret uint16)
- func Uint32(data []byte) (ret uint32)
- func Uint32Byte(data uint32) (ret []byte)
- func Uint32b(data []byte) (ret uint32)
- func Uint64(data []byte) uint64
- func Uint64Byte(data uint64) (ret []byte)
- func Uint64b(data []byte) (ret uint64)
- func Uint8Byte(data uint8) (ret []byte)
- func UintX(data []byte) (ret uint64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IPByteSlice ¶
IPByteSlice converts a string that contains an IP address into byte slice
func Uint16Byte ¶
Uint16Byte converts a uint16 to a byte slice in BigEndian
func Uint32Byte ¶
Uint32Byte converts a uint16 to a byte slice in BigEndian
func Uint64Byte ¶
Uint64Byte converts a uint64 to a byte slice in BigEndian
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.