github.com/zhouyu0/docker-note@v0.0.0-20190722021225-b8d3825084db/pkg/sysinfo/numcpu.go (about) 1 // +build !linux,!windows 2 3 package sysinfo // import "github.com/docker/docker/pkg/sysinfo" 4 5 import ( 6 "runtime" 7 ) 8 9 // NumCPU returns the number of CPUs 10 func NumCPU() int { 11 return runtime.NumCPU() 12 }