summaryrefslogtreecommitdiff
path: root/cmd/ponzu/templates/gen-reference.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/ponzu/templates/gen-reference.tmpl')
-rw-r--r--cmd/ponzu/templates/gen-reference.tmpl6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/ponzu/templates/gen-reference.tmpl b/cmd/ponzu/templates/gen-reference.tmpl
new file mode 100644
index 0000000..51afd6b
--- /dev/null
+++ b/cmd/ponzu/templates/gen-reference.tmpl
@@ -0,0 +1,6 @@
+View: reference.Select("[[ .Name ]]", [[ .Initial ]], map[string]string{
+ "label": "[[ .Name ]]",
+ },
+ "[[ .ReferenceName ]]",
+ `[[ range .ReferenceJSONTags ]]{{ .[[ . ]] }} [[ else ]][[ .ReferenceName ]]: {{ .id }}[[ end ]]`,
+),