mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 13:05:46 +00:00
util/endian: add package with const for whether platform is big endian
This commit is contained in:
parent
b0526e8284
commit
000347d4cf
10
util/endian/big.go
Normal file
10
util/endian/big.go
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (c) 2020 Tailscale Inc & AUTHORS All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build mips mips64 ppc64 s390x
|
||||||
|
|
||||||
|
package endian
|
||||||
|
|
||||||
|
// Big is whether the current platform is big endian.
|
||||||
|
const Big = true
|
6
util/endian/endian.go
Normal file
6
util/endian/endian.go
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
// Copyright (c) 2020 Tailscale Inc & AUTHORS All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// Package endian exports a constant about whether the machine is big endian.
|
||||||
|
package endian
|
10
util/endian/little.go
Normal file
10
util/endian/little.go
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (c) 2020 Tailscale Inc & AUTHORS All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build 386 amd64 arm arm64 mips64le mipsle ppc64le riscv64 wasm
|
||||||
|
|
||||||
|
package endian
|
||||||
|
|
||||||
|
// Big is whether the current platform is big endian.
|
||||||
|
const Big = false
|
Loading…
Reference in New Issue
Block a user