]> Cypherpunks repositories - gostls13.git/commit
internal/buildcfg: set Error instead of panicking
authorAustin Clements <austin@google.com>
Sat, 17 Apr 2021 01:50:46 +0000 (21:50 -0400)
committerAustin Clements <austin@google.com>
Tue, 4 May 2021 18:27:33 +0000 (18:27 +0000)
commite15d1f4e641641363b8791c2caecc06a43c1c615
treead56632ce911683db1382a4a8e9d0fd9b407b2c0
parentda7496d84128be85a4db5b6fdf9029c48c867211
internal/buildcfg: set Error instead of panicking

All build environment validation sets Error except for the
GOEXPERIMENT parser, which panics. Change it to also set Error so that
a bad GOEXPERIMENT doesn't cause everything that imports
internal/buildcfg to panic on init.

Change-Id: Ie9a506ef0978ecb410f2dcd784638f2167354175
Reviewed-on: https://go-review.googlesource.com/c/go/+/310970
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/internal/buildcfg/exp.go