Chore: use automaxprocs

This commit is contained in:
xjasonlyu
2022-01-28 15:01:04 +08:00
parent 2a2420f89d
commit 1bbb51b332
5 changed files with 25 additions and 2 deletions

View File

@@ -0,0 +1,11 @@
// Package automaxprocs automatically sets GOMAXPROCS to match the Linux
// container CPU quota, if any.
package automaxprocs
import (
"go.uber.org/automaxprocs/maxprocs"
)
func init() {
maxprocs.Set(maxprocs.Logger(func(string, ...interface{}) {}))
}