mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-07 01:26:43 +00:00
![Riley Karson](/assets/img/avatar_default.png)
```bash GO111MODULE=on go get github.com/hashicorp/terraform@pluginsdk-v0.12-early7 GO111MODULE=on go mod vendor GO111MODULE=on go mod tidy ```
31 lines
734 B
Go
31 lines
734 B
Go
// Copyright 2019 The Go 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 cpu
|
|
|
|
import (
|
|
"encoding/binary"
|
|
"runtime"
|
|
)
|
|
|
|
// hostByteOrder returns binary.LittleEndian on little-endian machines and
|
|
// binary.BigEndian on big-endian machines.
|
|
func hostByteOrder() binary.ByteOrder {
|
|
switch runtime.GOARCH {
|
|
case "386", "amd64", "amd64p32",
|
|
"arm", "arm64",
|
|
"mipsle", "mips64le", "mips64p32le",
|
|
"ppc64le",
|
|
"riscv", "riscv64":
|
|
return binary.LittleEndian
|
|
case "armbe", "arm64be",
|
|
"mips", "mips64", "mips64p32",
|
|
"ppc", "ppc64",
|
|
"s390", "s390x",
|
|
"sparc", "sparc64":
|
|
return binary.BigEndian
|
|
}
|
|
panic("unknown architecture")
|
|
}
|