summaryrefslogtreecommitdiff
path: root/vendor/github.com/tetratelabs/wazero/internal/u32/u32.go
blob: 5960a6f0cc8a9476b5e7c9272a7e6da2f39ac4b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
package u32

// LeBytes returns a byte slice corresponding to the 4 bytes in the uint32 in little-endian byte order.
func LeBytes(v uint32) []byte {
	return []byte{
		byte(v),
		byte(v >> 8),
		byte(v >> 16),
		byte(v >> 24),
	}
}