Answers for "golang uint64 to bytes"

Go
0

uint64 to byte golang

i := int64(-123456789)

fmt.Println(i)

b := make([]byte, 8)
binary.LittleEndian.PutUint64(b, uint64(i))

fmt.Println(b)

i = int64(binary.LittleEndian.Uint64(b))
fmt.Println(i)
Posted by: Guest on January-29-2021

Browse Popular Code Answers by Language