u64.go
1package u64
2
3// LeBytes returns a byte slice corresponding to the 8 bytes in the uint64 in little-endian byte order.
4func LeBytes(v uint64) []byte {
5 return []byte{
6 byte(v),
7 byte(v >> 8),
8 byte(v >> 16),
9 byte(v >> 24),
10 byte(v >> 32),
11 byte(v >> 40),
12 byte(v >> 48),
13 byte(v >> 56),
14 }
15}