Merge pull request #398 from marineam/gomax

main: default to GOMAXPROCS=1
This commit is contained in:
Michael Marineau 2015-09-30 20:43:03 -07:00
commit 3c2b5e6636
2 changed files with 8 additions and 1 deletions

View File

@ -19,6 +19,7 @@ import (
"fmt" "fmt"
"log" "log"
"os" "os"
"runtime"
"sync" "sync"
"time" "time"
@ -129,6 +130,12 @@ var (
func main() { func main() {
failure := false failure := false
// Conservative Go 1.5 upgrade strategy:
// keep GOMAXPROCS' default at 1 for now.
if os.Getenv("GOMAXPROCS") == "" {
runtime.GOMAXPROCS(1)
}
flag.Parse() flag.Parse()
if c, ok := oemConfigs[flags.oem]; ok { if c, ok := oemConfigs[flags.oem]; ok {

2
test
View File

@ -31,7 +31,7 @@ gofmt -d -e $SRC
# split SRC into an array and prepend REPO_PATH to each local package for go vet # split SRC into an array and prepend REPO_PATH to each local package for go vet
split_vet=(${SRC// / }) split_vet=(${SRC// / })
VET_TEST=${split_vet[@]/#/${REPO_PATH}/} VET_TEST="${REPO_PATH} ${split_vet[@]/#/${REPO_PATH}/}"
echo "Checking govet..." echo "Checking govet..."
go vet $VET_TEST go vet $VET_TEST