I have a function which receives a []byte but I what I have is an int, what is the best way to go about this conversion?
[]byte
int
err = a.Wr
Check out the "encoding/binary" package. Particularly the Read and Write functions:
binary.Write(a, binary.LittleEndian, myInt)