mirror of
https://github.com/ent/ent.git
synced 2026-04-28 05:30:56 +03:00
doc/md: update templates.md (#1905)
This commit is contained in:
@@ -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:
|
||||
|
||||

|
||||

|
||||
|
||||
Reference in New Issue
Block a user