github.com/noriah/catnip@v1.8.5/input/common/endian/endian.go (about) 1 package endian 2 3 import "unsafe" 4 5 // IsLE returns true if the host architecture is little-endian. 6 func IsLE() bool { 7 x := 1 8 return *(*byte)(unsafe.Pointer(&x)) == 1 9 }