From e9e9ea47d8bcbdbcf91a2ad822e107d8561a9822 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Mon, 7 Nov 2016 19:35:40 -0800 Subject: updating Identifiable interface, renaming its method and changing name where used throughout codebase --- content/item.go | 6 +++--- system/admin/handlers.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/item.go b/content/item.go index 81593b6..d099936 100644 --- a/content/item.go +++ b/content/item.go @@ -28,8 +28,8 @@ func (i *Item) SetSlug(slug string) { i.Slug = slug } -// SetContentID sets the Item's ID field -func (i *Item) SetContentID(id int) { +// SetItemID sets the Item's ID field +func (i *Item) SetItemID(id int) { i.ID = id } @@ -46,5 +46,5 @@ type Sluggable interface { // a newly initialized struct would have an ID of 0, the int zero-value, and // BoltDB's starting key per bucket is 0, thus overwriting the first record. type Identifiable interface { - SetContentID(int) + SetItemID(int) } diff --git a/system/admin/handlers.go b/system/admin/handlers.go index 1f277e0..e653d29 100644 --- a/system/admin/handlers.go +++ b/system/admin/handlers.go @@ -946,7 +946,7 @@ func editHandler(res http.ResponseWriter, req *http.Request) { log.Println("Content type", t, "doesn't implement editor.Identifiable") return } - s.SetContentID(-1) + s.SetItemID(-1) } -- cgit v1.2.3