Hexit provides utility functions to convert uint*
to hex. It's faster than using fmt.Sprintf
, strconv.AppendUint
or strconv.FormatUint
.
buf := make([]byte, 8)
hexit.HexUint32To(num, buf)
buf := hexit.HexUint32(num)
str := hexit.HexUint16(num)
num := UnhexUint16("beef")