Mastering-Go-Second-Edition/ch10/maxprocs.go
2019-01-10 22:09:57 +02:00

14 lines
169 B
Go

package main
import (
"fmt"
"runtime"
)
func getGOMAXPROCS() int {
return runtime.GOMAXPROCS(0)
}
func main() {
fmt.Printf("GOMAXPROCS: %d\n", getGOMAXPROCS())
}