mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
util/endian: add Native variable to get the platform's native binary.ByteOrder
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
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…
Reference in New Issue
Block a user