golang-exercises/query-cpu/main.go

18 lines
196 B
Go
Raw Normal View History

2024-03-21 22:03:27 +01:00
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)
}