From 9829e2862662f788b9f808c50f8dd62a32b5479d Mon Sep 17 00:00:00 2001 From: Salim B Date: Wed, 25 Oct 2023 19:52:06 +0200 Subject: [PATCH] Mention Go variable naming rules --- content/en/templates/introduction.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/content/en/templates/introduction.md b/content/en/templates/introduction.md index 93666de28..2eb436f82 100644 --- a/content/en/templates/introduction.md +++ b/content/en/templates/introduction.md @@ -114,6 +114,8 @@ all other pages: Var is {{ $var }} ``` +Variable names must conform to Go's naming rules for [identifiers][identifier]. + ## Functions Go Templates only ship with a few basic functions but also provide a mechanism for applications to extend the original set. @@ -660,6 +662,7 @@ If you restrict front matter to the TOML format, and omit quotation marks surrou [dotdoc]: https://golang.org/pkg/text/template/#hdr-Variables [front matter]: /content-management/front-matter [functions]: /functions +[identifier]: /getting-started/glossary/#identifier [internal templates]: /templates/internal [math]: /functions/math [pagevars]: /variables/page