if I byte array:
byte_array := []byte("klm,\x15\xf1
")
I would like to the byte \x15 and \xf1 to uint16 in LittleEndian order. What is the easiest way of doing it?
Tried the following:
var new_uint uint16
bff := bytes.newRead(byte_array[4:5])
err = binary.Read(buff, binary.LittleEndian, &new_uint)
but I keep getting nothing, and this is relatively complicated, is there an easier way of doing it?
Thanks...