doc/md: update templates.md (#1905)

This commit is contained in:
Rotem Tamir
2021-09-02 09:42:41 +03:00
committed by GitHub
parent bbc4a4c14b
commit 5fc8e708c2

View File

@@ -19,7 +19,7 @@ execution output to a file with the same name as the template. For example:
{{ $pkg := base $.Config.Package }}
{{ template "header" $ }}
{{/* Loop over all nodes and add implement the "GoStringer" interface */}}
{{/* Loop over all nodes and implement the "GoStringer" interface */}}
{{ range $n := $.Nodes }}
{{ $receiver := $n.Receiver }}
func ({{ $receiver }} *{{ $n.Name }}) GoString() string {
@@ -265,4 +265,4 @@ JetBrains users can add the following template annotation to enable the autocomp
See it in action:
![template-autocomplete](https://entgo.io/images/assets/template-autocomplete.gif)
![template-autocomplete](https://entgo.io/images/assets/template-autocomplete.gif)