util/endian: add package with const for whether platform is big endian

This commit is contained in:
Brad Fitzpatrick
2020-11-14 19:50:00 -08:00
parent b0526e8284
commit 000347d4cf
3 changed files with 26 additions and 0 deletions

10
util/endian/big.go Normal file
View 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