diff options
-rw-r--r-- | cmd/ponzu/templates/gen-content.tmpl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/ponzu/templates/gen-content.tmpl b/cmd/ponzu/templates/gen-content.tmpl index 78b5123..9cfca9d 100644 --- a/cmd/ponzu/templates/gen-content.tmpl +++ b/cmd/ponzu/templates/gen-content.tmpl @@ -38,4 +38,10 @@ func ({{ .Initial }} *{{ .Name }}) MarshalEditor() ([]byte, error) { func init() { item.Types["{{ .Name }}"] = func() interface{} { return new({{ .Name }}) } +} + +// String defines how a {{ .Name }} is printed. Update it using more descriptive +// fields from the {{ .Name }} struct type +func ({{ .Initial }} *{{ .Name }}) String() string { + return fmt.Sprintf("{{ .Name }}: %s", {{ .Initial }}.UUID) }
\ No newline at end of file |