8c31e45860
* hostutil: query stats with context, update gopsutil, refactor tests * go mod vendor * minor comment wording
16 lines
280 B
Go
16 lines
280 B
Go
// +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
|
|
}
|