package main import ( "fmt" "github.com/jaypipes/ghw" "log" ) func main() { cpuCores, err := ghw.CPU() if err != nil { log.Fatalf("Error occurred: %v", err) } fmt.Println(cpuCores) }