summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-11-28 15:13:03 -0800
committerSteve Manuel <nilslice@gmail.com>2016-11-28 15:13:03 -0800
commit553235a85fd013ae91173f15ec74503347573cd6 (patch)
tree20db8be95753dcd344267ddbebed686803c33695
parent860472da96a1b3dc3ce086e8508aac7b4940ade6 (diff)
changing file layout
-rw-r--r--cmd/ponzu/contentType.tmpl8
1 files changed, 2 insertions, 6 deletions
diff --git a/cmd/ponzu/contentType.tmpl b/cmd/ponzu/contentType.tmpl
index 0cc8a3c..6d68dfa 100644
--- a/cmd/ponzu/contentType.tmpl
+++ b/cmd/ponzu/contentType.tmpl
@@ -6,7 +6,6 @@ import (
"github.com/bosssauce/ponzu/management/editor"
)
-
type {{ .Name }} struct {
Item
editor editor.Editor
@@ -22,17 +21,14 @@ func ({{ .Initial }} *{{ .Name }}) MarshalEditor() ([]byte, error) {
// Take note that the first argument to these Input-like functions
// is the string version of each {{ .Name }} field, and must follow
// this pattern for auto-decoding and auto-encoding reasons:
-
{{ $initial := .Initial }}
- {{ range .Fields }}
- editor.Field{
+ {{ range .Fields }}editor.Field{
View: editor.Input("{{ .Name }}", {{ $initial }}, map[string]string{
"label": "{{ .Name }}",
"type": "text",
"placeholder": "Enter the {{ .Name }} here",
}),
- },
- {{ end }}
+ },{{ end }}
)
if err != nil {