Xinwei Xiong (cubxxw) 3026b74e9c feat: support openim readme docs
Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com>
2024-02-02 19:47:47 +08:00

19 lines
441 B
Go

package main
import (
"fmt"
"runtime"
"go.uber.org/automaxprocs/maxprocs"
)
func main() {
// Set maxprocs with a custom logger that does nothing to ignore logs.
maxprocs.Set(maxprocs.Logger(func(string, ...interface{}) {
// Intentionally left blank to suppress all log output from automaxprocs.
}))
// Now this will print the GOMAXPROCS value without printing the automaxprocs log message.
fmt.Println(runtime.GOMAXPROCS(0))
}