mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 19:35:41 +03:00
The PR we needed https://github.com/shirou/gopsutil/pull/889 has been merged upstream, which means we can use upstream rather than our fork of psutil.
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
|
|
}
|