summaryrefslogtreecommitdiff
path: root/management/editor/editor.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-09-22 17:47:14 -0700
committerSteve Manuel <nilslice@gmail.com>2016-09-22 17:47:14 -0700
commit27c175f6c626175598ee0a3d5c7b750a84d583e2 (patch)
tree563cd0451d81464afb1269d7f703ddb8e4d9d9f0 /management/editor/editor.go
parentf31c13d76e5de8ab0420ecaf0f570e52f6218066 (diff)
adding a generator for custom post content types, slug for url based on title, main file to manage commands
Diffstat (limited to 'management/editor/editor.go')
-rw-r--r--management/editor/editor.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/management/editor/editor.go b/management/editor/editor.go
index 0acf03e..f49c4e3 100644
--- a/management/editor/editor.go
+++ b/management/editor/editor.go
@@ -6,8 +6,10 @@ import "bytes"
// Editable ensures data is editable
type Editable interface {
+ SetContentID(id int)
ContentID() int
ContentName() string
+ SetSlug(slug string)
Editor() *Editor
MarshalEditor() ([]byte, error)
}
@@ -23,9 +25,9 @@ type Field struct {
View []byte
}
-// New takes editable content and any number of Field funcs to describe the edit
+// Form takes editable content and any number of Field funcs to describe the edit
// page for any content struct added by a user
-func New(post Editable, fields ...Field) ([]byte, error) {
+func Form(post Editable, fields ...Field) ([]byte, error) {
editor := post.Editor()
editor.ViewBuf = &bytes.Buffer{}