automatically adjust GOMAXPROCS when run in a cpu-constrained container

This commit is contained in:
Michael Eischer
2023-09-28 19:45:58 +02:00
parent 4087c3aff7
commit f5d5e8fd0a
4 changed files with 22 additions and 5 deletions

2
go.mod
View File

@@ -25,6 +25,7 @@ require (
github.com/restic/chunker v0.4.0
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
go.uber.org/automaxprocs v1.5.3
golang.org/x/crypto v0.13.0
golang.org/x/net v0.15.0
golang.org/x/oauth2 v0.12.0
@@ -57,6 +58,7 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/minio/md5-simd v1.1.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect