...
Source file src/pkg/vendor/golang.org/x/sys/cpu/byteorder.go
1
2
3
4
5 package cpu
6
7 import (
8 "encoding/binary"
9 "runtime"
10 )
11
12
13
14 func hostByteOrder() binary.ByteOrder {
15 switch runtime.GOARCH {
16 case "386", "amd64", "amd64p32",
17 "arm", "arm64",
18 "mipsle", "mips64le", "mips64p32le",
19 "ppc64le",
20 "riscv", "riscv64":
21 return binary.LittleEndian
22 case "armbe", "arm64be",
23 "mips", "mips64", "mips64p32",
24 "ppc", "ppc64",
25 "s390", "s390x",
26 "sparc", "sparc64":
27 return binary.BigEndian
28 }
29 panic("unknown architecture")
30 }
31
View as plain text