Documentation ¶
Index ¶
- Constants
- Variables
- func BytesToBool(buf []byte, offset, length int) bool
- func BytesToFloat32(buf []byte, offset int) float32
- func BytesToFloat64(buf []byte, offset int) float64
- func BytesToHexString(buf []byte) string
- func BytesToInt16(buf []byte, offset int) int16
- func BytesToInt32(buf []byte, offset int) int32
- func BytesToInt64(buf []byte, offset int) int64
- func BytesToUint16(buf []byte, offset int) uint16
- func BytesToUint32(buf []byte, offset int) uint32
- func LittleBytesToInt32(buf []byte, offset int) int32
- func LittleBytesToInt64(buf []byte, offset int) int64
- func VarBytesToInt64(buf []byte, offset int, len int) int64
Constants ¶
const ( // SizeOfInt32 defines the size of int32 SizeOfInt32 = uintptr(4) // SizeOfInt64 defines the size of int64 SizeOfInt64 = uintptr(8) )
Variables ¶
var Arch32Bits bool
Arch32Bits defines if the system is 32 bits
var Arch64Bits bool
Arch64Bits defines if the system is 64 bits
var SizeOfInt uintptr
SizeOfInt defines the size of native int
Functions ¶
func BytesToBool ¶
BytesToBool converts a byte slice to a bool
func BytesToFloat32 ¶
BytesToFloat32 converts a byte slice to a float32
func BytesToFloat64 ¶
BytesToFloat64 converts a byte slice to a float64
func BytesToHexString ¶
BytesToHexString converts a byte slice into a hex string
func BytesToInt16 ¶
BytesToInt16 converts a slice of bytes to an int16
func BytesToInt32 ¶
BytesToInt32 converts a slice into int32; only maximum of 4 bytes will be used
func BytesToInt64 ¶
BytesToInt64 converts a slice into int64; only maximum of 8 bytes will be used
func BytesToUint16 ¶
BytesToUint16 converts a byte slice to a uint16
func BytesToUint32 ¶
BytesToUint32 converts a slice into uint32; only maximum of 4 bytes will be used
func LittleBytesToInt32 ¶
LittleBytesToInt32 converts a slice into int32; only maximum of 4 bytes will be used
func LittleBytesToInt64 ¶
LittleBytesToInt64 converts a slice into int64; only maximum of 8 bytes will be used
Types ¶
This section is empty.