]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/toolchain: use sync.OnceValue
authorKir Kolyshkin <kolyshkin@gmail.com>
Thu, 5 Sep 2024 00:11:40 +0000 (17:11 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 6 Sep 2024 13:19:20 +0000 (13:19 +0000)
commit4777fd3d31bee83d076b3b3d981367103da17e34
tree97db3dfae996fe464b7e0fb892beba875fc1f87e
parentba2a16cb63ec81703198f05e9d7bf6f1c892f9df
cmd/go/internal/toolchain: use sync.OnceValue

Rename initPathExts to pathExts, make it return the slice of extensions,
and wrap into sync.OnceValue.

While at it, return early if PATHEXT is empty.

Change-Id: I33508762e87edd226e0a52df4063473c496c0210
Reviewed-on: https://go-review.googlesource.com/c/go/+/611017
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
src/cmd/go/internal/toolchain/path_windows.go