]> Cypherpunks repositories - gostls13.git/commit
internal/testenv: use sync.OnceValue[s]
authorKir Kolyshkin <kolyshkin@gmail.com>
Fri, 30 Aug 2024 00:31:03 +0000 (17:31 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 30 Aug 2024 17:08:17 +0000 (17:08 +0000)
commitb648cd620f47c2981420b032def1e6f6491ef294
treee822dbefbca0c30280a4bbe1608ef8f7686cc58d
parent46985f4ec2a83241de4c0cec522df0ed19a3635d
internal/testenv: use sync.OnceValue[s]

Modernize the code to use sync.OnceValue[s] instead of sync.Once.

While at it, reuse the result of exec.LookPath("go") in tryGoBuild.

Change-Id: I13eff3dd55797846680e506fffb7c49c8296829d
Reviewed-on: https://go-review.googlesource.com/c/go/+/609796
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
Commit-Queue: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/internal/testenv/testenv.go