1 2 3 4 5 6 7 8 9
// +build !linux package devices import "github.com/shirou/gopsutil/cpu" func CpuCount() (int, error) { return cpu.Counts(false) }