1d4f3166fb
* core(deps): bump golang.org/x/sys To resolve /go/pkg/mod/github.com/shirou/gopsutil@v2.20.9+incompatible/host/host_bsd.go:20:13: undefined: unix.SysctlTimeval * chore(deps): make update-vendor
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
|
|
}
|