]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/auth: use sync.OnceValues
authorKir Kolyshkin <kolyshkin@gmail.com>
Wed, 4 Sep 2024 22:42:26 +0000 (15:42 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 6 Sep 2024 13:19:17 +0000 (13:19 +0000)
commitba2a16cb63ec81703198f05e9d7bf6f1c892f9df
treee2851c66259b4f45032a6bc0e96e0fb3faa3283a
parente6ae2d83acc088349f7a327a968ffa1f2ae41dec
cmd/go/internal/auth: use sync.OnceValues

Use sync.OnceValues (CL 451356, since Go 1.21) instead of sync.Once for
cleaner code and less global variables, preventing their potential
misuse.

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