aboutsummaryrefslogtreecommitdiff
path: root/src/text/template/examplefunc_test.go
AgeCommit message (Collapse)Author
2025-03-07text/template: add an if func examplelinmaolin
Updates #13880 Change-Id: I0fd3b1a32e485bc8f15238c86a8bbdc161f20fa5 GitHub-Last-Rev: d1e92b31243c86435add422ee46aaff768453cad GitHub-Pull-Request: golang/go#71922 Reviewed-on: https://go-review.googlesource.com/c/go/+/651916 Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-03-05text/template: provide example of overwriting template func after parserorycl
This example illustrates how to overwrite a template function after parsing a template. This example is intended to clarify the point made in the template.Funcs docstring that "[i]t is legal to overwrite elements of the map." Change-Id: Ibded05974d580c54a24fcc16687fd52ce21133ff GitHub-Last-Rev: ef19a221ab44f47695c27b3114281112231a1b42 GitHub-Pull-Request: golang/go#72094 Reviewed-on: https://go-review.googlesource.com/c/go/+/654416 Reviewed-by: Junyang Shao <shaojunyang@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
2014-09-08build: move package sources from src/pkg to srcRuss Cox
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.