Documentation ¶
Index ¶
- func AnyListToStringList(list *[]any) []string
- func BoolErrToStringErr(n bool, err error) (string, error)
- func BytesToKilobytes(b int) int
- func DecodeHexByte(value *byte, c1, c2 byte) (ok bool)
- func DecodeHexByte64(value *[8]byte, src []byte) (ok bool)
- func DecodeHexChar(value *byte, c byte) (ok bool)
- func DecodeHexUint16(value *uint16, src []byte) (ok bool)
- func DecodeHexUint32(value *uint32, src []byte) (ok bool)
- func ErrorToString(err error) string
- func Float64ErrToStringErr(n float64, err error) (string, error)
- func Int64ToIntSafe(num int64) (int, error)
- func IntErrToStringErr(n int, err error) (string, error)
- func IntToStringFuncWrapper(fn func() (int, error)) (string, error)
- func MegabytesToKiloBytes(n int) int
- func PutByteHex(hexOutput, byteSource []byte)
- func PutUint16Hex(b []byte, v uint16)
- func PutUint32Hex(b []byte, v uint32)
- func PutUint64Hex(b []byte, v uint64)
- func StringListToAnyList(list *[]string) []any
- func UnsafeAtoI(a string) (i int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyListToStringList ¶
AnyListToStringList - Convert an []any list to []string
func BoolErrToStringErr ¶
BoolErrToStringErr - given a bool and error, return its string, error. (useful as a wrapper)
func BytesToKilobytes ¶
BytesToKilobytes - convert the number of bytes to a number of kilobytes
func DecodeHexByte ¶
DecodeHexByte - Decode a hexadecimal byte
func DecodeHexByte64 ¶
DecodeHexByte64 - decodes two sets of hexadecimal bytes and returns the resulting byte values
func DecodeHexChar ¶
DecodeHexChar - decode a single byte representing a hexadecimal digit and return the numeric equivalent as a byte
func DecodeHexUint16 ¶
DecodeHexUint16 - Decode a hexadecimal 2-byte slice into a 16-bit unsigned-integer
func DecodeHexUint32 ¶
DecodeHexUint32 - decode a 32-bit hexidecimal byte string as uint32
func ErrorToString ¶
ErrorToString - Safely turn an error into a string
func Float64ErrToStringErr ¶
Float64ErrToStringErr - given a float64 and error, return its string, error. (useful as a wrapper)
func Int64ToIntSafe ¶
Int64ToIntSafe - safely convert int64 to integer
func IntErrToStringErr ¶
IntErrToStringErr - given an int and error, return its string, error. (useful as a wrapper)
func IntToStringFuncWrapper ¶
IntToStringFuncWrapper - convert an integer to a string
func MegabytesToKiloBytes ¶
MegabytesToKiloBytes - Given an integer (in Megabytes) return the value in Kilobytes)
func PutByteHex ¶
func PutByteHex(hexOutput, byteSource []byte)
PutByteHex - store a byte array as a hex byte array
func PutUint16Hex ¶
PutUint16Hex - Write uint16 to a byte array as hex
func PutUint32Hex ¶
PutUint32Hex - write a 32-bit value into a hexidecimal byte array
func PutUint64Hex ¶
PutUint64Hex - write a 64-bit value into a hexadecimal byte array
func StringListToAnyList ¶
StringListToAnyList - Convert a list of strings to an []any list
func UnsafeAtoI ¶
UnsafeAtoI - ignore any error converting string to integer (0 on error)
Types ¶
This section is empty.
Source Files ¶
- AnyListToStringList.go
- BoolErrToStringErr.go
- BytesToKilobytes.go
- DecodeHexByte.go
- DecodeHexByte64.go
- DecodeHexChar.go
- DecodeHexUint16.go
- DecodeHexUint32.go
- ErrorToString.go
- Float64ErrToStringErr.go
- Int64ToIntSafe.go
- IntErrToStringErr.go
- IntToStringFuncWrapper.go
- MegabytesToKiloBytes.go
- PutByteHex.go
- PutUint16Hex.go
- PutUint32Hex.go
- PutUint64Hex.go
- StringListToAnyList.go
- UnsafeAtoI.go
- constants.go