util/endian: add Native variable to get the platform's native binary.ByteOrder

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/946/head
Brad Fitzpatrick 4 years ago committed by Brad Fitzpatrick
parent 883a11f2a8
commit c8939ab7c7

@ -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

@ -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

Loading…
Cancel
Save