mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-06 17:26:58 +08:00
Chore: use automaxprocs
This commit is contained in:
11
common/automaxprocs/automaxprocs.go
Normal file
11
common/automaxprocs/automaxprocs.go
Normal 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{}) {}))
|
||||
}
|
Reference in New Issue
Block a user