Documentation ¶
Index ¶
- func BytesToU16(b []byte) uint16
- func BytesToU32(b []byte) uint32
- func BytesToU32Slice(b []byte) []uint32
- func BytesToU64(b []byte) uint64
- func BytesToU64Slice(b []byte) []uint64
- func IBytesToString(size uint64, precision int) string
- func U16ToBytes(v uint16) []byte
- func U32SliceToBytes(u32s []uint32) []byte
- func U32ToBytes(v uint32) []byte
- func U64SliceToBytes(u64s []uint64) []byte
- func U64ToBytes(v uint64) []byte
- func U8ToByte(v uint8) byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToU16 ¶
BytesToU16 converts the given byte slice to uint16
func BytesToU32 ¶
BytesToU32 converts the given byte slice to uint32
func BytesToU32Slice ¶
BytesToU32Slice converts the given byte slice to uint32 slice
func BytesToU64 ¶
BytesToU64 converts the given byte slice to uint64
func BytesToU64Slice ¶
BytesToU64Slice converts the given byte slice to uint64 slice
func IBytesToString ¶
IBytesToString converts size in bytes to human readable format. The code is taken from humanize library and changed to provide value upto custom decimal precision. IBytesToString(12312412, 1) -> 11.7 MiB
func U32SliceToBytes ¶
U32SliceToBytes converts the given Uint32 slice to byte slice
func U64SliceToBytes ¶
U64SliceToBytes converts the given Uint64 slice to byte slice
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.