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

View File

@@ -9,13 +9,13 @@ import (
"runtime"
godebug "runtime/debug"
"github.com/spf13/cobra"
_ "go.uber.org/automaxprocs"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/options"
"github.com/restic/restic/internal/restic"
"github.com/spf13/cobra"
"github.com/restic/restic/internal/errors"
)
// cmdRoot is the base command when no other command has been specified.