aboutsummaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authorqiulaidongfeng <2645477756@qq.com>2024-11-21 00:01:36 +0800
committerMichael Matloob <matloob@golang.org>2024-11-21 16:35:55 +0000
commitf5973c2183d64f93816c0a28189cdd3f263036fb (patch)
tree599c9f018004c0a8cd3d10b7a158ea192c5752d4 /src/internal
parent4671276c5d5f2e51dd43e856267eac44cff18652 (diff)
downloadgo-f5973c2183d64f93816c0a28189cdd3f263036fb.tar.xz
cmd/go: fix -changed don`t print when GOFIPS140 is non-default
See https://github.com/golang/go/issues/70200#issuecomment-2468562595, GOFIPS140 value when building the toolchain (off when not set) is the default value for GOFIPS140, it is buildcfg.defaultGOFIPS140, export as buildcfg.DefaultGOFIPS140 that can be used in the cmd/go. For #70200 Change-Id: I5a4873a718eeefda8e65bfab51d9d3d5ad2c21b6 Reviewed-on: https://go-review.googlesource.com/c/go/+/629996 Reviewed-by: Michael Matloob <matloob@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Filippo Valsorda <filippo@golang.org>
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/buildcfg/cfg.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/internal/buildcfg/cfg.go b/src/internal/buildcfg/cfg.go
index 1d6dc0ff3c..fca09bf8d3 100644
--- a/src/internal/buildcfg/cfg.go
+++ b/src/internal/buildcfg/cfg.go
@@ -72,7 +72,7 @@ func goamd64() int {
}
func gofips140() string {
- v := envOr("GOFIPS140", defaultGOFIPS140)
+ v := envOr("GOFIPS140", DefaultGOFIPS140)
switch v {
case "off", "latest", "inprocess", "certified":
return v
@@ -81,7 +81,7 @@ func gofips140() string {
return v
}
Error = fmt.Errorf("invalid GOFIPS140: must be off, latest, inprocess, certified, or vX.Y.Z")
- return defaultGOFIPS140
+ return DefaultGOFIPS140
}
// isFIPSVersion reports whether v is a valid FIPS version,