commit | 2c1604142324be55a9274bc13a5a143bb3cde809 | [log] [tgz] |
---|---|---|
author | rorycl <rorycl@campbell-lange.net> | Tue Mar 04 22:47:17 2025 +0000 |
committer | Gopher Robot <gobot@golang.org> | Wed Mar 05 07:58:03 2025 -0800 |
tree | 66b31c33f6c510e34205762339ced3fadfb855c5 | |
parent | 2e6cbab1c84363638ed48f259c3db57c4d2aaab3 [diff] |
text/template: provide example of overwriting template func after parse 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>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 4.0 Attribution license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.