You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-library/vendor/github.com/shirou/gopsutil/host/host_posix.go

16 lines
280 B

// +build linux freebsd openbsd darwin solaris
package host
import (
"bytes"
"golang.org/x/sys/unix"
)
func KernelArch() (string, error) {
var utsname unix.Utsname
err := unix.Uname(&utsname)
return string(utsname.Machine[:bytes.IndexByte(utsname.Machine[:], 0)]), err
}