]> Cypherpunks repositories - gostls13.git/commit
text/template: use sync.OnceValue for builtinFuncs
author1911860538 <alxps1911@gmail.com>
Wed, 14 May 2025 15:25:40 +0000 (15:25 +0000)
committerGopher Robot <gobot@golang.org>
Fri, 8 Aug 2025 19:53:12 +0000 (12:53 -0700)
commit777d76c4f2392b782418a867172e7e951c0278f8
tree3c66667331109593c91f53cc1f95864d554e839b
parent0201524c527f18e21240dce682dfe725b08cfb12
text/template: use sync.OnceValue for builtinFuncs

Replaced sync.Once with sync.OnceValue to simplify code and reduce globals.

Change-Id: I0586df379b855950eacc5b98baad68f6ba0ba129
GitHub-Last-Rev: 7540b1efba864901c1dc00833a72cb9ed306c52f
GitHub-Pull-Request: golang/go#73689
Reviewed-on: https://go-review.googlesource.com/c/go/+/672235
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Sean Liao <sean@liao.dev>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/text/template/funcs.go