Initial commit
This commit is contained in:
10
vendor/github.com/shirou/gopsutil/v3/internal/common/endian.go
generated
vendored
Normal file
10
vendor/github.com/shirou/gopsutil/v3/internal/common/endian.go
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
package common
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// IsLittleEndian checks if the current platform uses little-endian.
|
||||
// copied from https://github.com/ntrrg/ntgo/blob/v0.8.0/runtime/infrastructure.go#L16 (MIT License)
|
||||
func IsLittleEndian() bool {
|
||||
var x int16 = 0x0011
|
||||
return *(*byte)(unsafe.Pointer(&x)) == 0x11
|
||||
}
|
||||
Reference in New Issue
Block a user