Registry / utility / tklauser-numcpus

tklauser-numcpus

JSON →
library0.11.0gogounverified

Package numcpus provides information about the number of CPUs in the system across multiple platforms.

go get github.com/tklauser/numcpus
INSTALL
IMPORT
SIG · TKLAUSER-NUMCPUS
T
tklauser-numcpus
utilitygov0.11.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

numcpus
github.com/tklauser/numcpus

Gets the number of online CPUs.

package main import ( "fmt" "github.com/tklauser/numcpus" ) func main() { n, _ := numcpus.GetOnline() fmt.Println("Online CPUs:", n) }
Debug
Known issues
gotchaNot all functions are supported on all platforms; ErrNotSupported may be returned.
fix
Check the documentation for platform-specific support.
affects: all
Upgrade
Version history
0.11.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
12
Resources
tklauser-numcpus — go get tklauser-numcpus · libregistry