hugolib: Fix the GOMAXPROCS env get

Fixes #5813
This commit is contained in:
Bjørn Erik Pedersen
2019-04-05 09:31:16 +02:00
parent 8559f5c29f
commit 415ca9673d

View File

@@ -1883,7 +1883,7 @@ func (s *Site) newPage(kind string, sections ...string) *pageState {
func getGoMaxProcs() int {
if gmp := os.Getenv("GOMAXPROCS"); gmp != "" {
if p, err := strconv.Atoi(gmp); err != nil {
if p, err := strconv.Atoi(gmp); err == nil {
return p
}
}