summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-11-03 01:27:35 -0700
committerSteve Manuel <nilslice@gmail.com>2016-11-03 01:27:35 -0700
commit76f652ecc9333a01d3ea919583ad63409dbc4a2b (patch)
tree3353bebf50cc5dcc08730408b16b847a779eeca6
parent819da3f8389d75ad4c49d51cab6a91d39ec1ce73 (diff)
implementing SetContentID to satisfy the Identifiable interface
-rw-r--r--content/item.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/content/item.go b/content/item.go
index 0077dc6..81593b6 100644
--- a/content/item.go
+++ b/content/item.go
@@ -28,6 +28,11 @@ func (i *Item) SetSlug(slug string) {
i.Slug = slug
}
+// SetContentID sets the Item's ID field
+func (i *Item) SetContentID(id int) {
+ i.ID = id
+}
+
// Sluggable makes a struct locatable by URL with it's own path
// As an Item implementing Sluggable, slugs may overlap. If this is an issue,
// make your content struct (or one which imbeds Item) implement Sluggable