Don't set GOMAXPROCS

This was a temporary fix for Go earlier than 1.5 to run code on all
avaialble cores. We don't need that any more since we require at least
Go 1.6.
This commit is contained in:
Alexander Neumann 2017-01-02 17:49:49 +01:00
parent 844c959912
commit 79e198451c
1 changed files with 0 additions and 12 deletions

View File

@ -5,7 +5,6 @@ import (
"os" "os"
"restic" "restic"
"restic/debug" "restic/debug"
"runtime"
"github.com/spf13/cobra" "github.com/spf13/cobra"
@ -33,17 +32,6 @@ directories in an encrypted repository stored on different backends.
}, },
} }
func init() {
// set GOMAXPROCS to number of CPUs
if runtime.Version() < "go1.5" {
gomaxprocs := os.Getenv("GOMAXPROCS")
debug.Log("read GOMAXPROCS from env variable, value: %s", gomaxprocs)
if gomaxprocs == "" {
runtime.GOMAXPROCS(runtime.NumCPU())
}
}
}
func main() { func main() {
debug.Log("main %#v", os.Args) debug.Log("main %#v", os.Args)
err := cmdRoot.Execute() err := cmdRoot.Execute()