github.com/bananabytelabs/wazero@v0.0.0-20240105073314-54b22a776da8/internal/u64/u64.go (about) 1 package u64 2 3 // LeBytes returns a byte slice corresponding to the 8 bytes in the uint64 in little-endian byte order. 4 func 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 }