diff --git a/util/endian/big.go b/util/endian/big.go index 0dcdbab1f..d0be83b81 100644 --- a/util/endian/big.go +++ b/util/endian/big.go @@ -6,5 +6,10 @@ package endian +import "encoding/binary" + // Big is whether the current platform is big endian. const Big = true + +// Native is the platform's native byte order. +var Native = binary.BigEndian diff --git a/util/endian/little.go b/util/endian/little.go index dd8686356..78c85a427 100644 --- a/util/endian/little.go +++ b/util/endian/little.go @@ -6,5 +6,10 @@ package endian +import "encoding/binary" + // Big is whether the current platform is big endian. const Big = false + +// Native is the platform's native byte order. +var Native = binary.LittleEndian