From 8aeec907a44a986b6c3975f13573b00a0043f67c Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Tue, 18 Oct 2016 18:37:57 -0700 Subject: adding the Touch() method to Sortable interface, which would enable us to sort by updated time --- content/item.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'content') diff --git a/content/item.go b/content/item.go index 79d0197..f4a5489 100644 --- a/content/item.go +++ b/content/item.go @@ -13,6 +13,11 @@ func (i Item) Time() int64 { return i.Timestamp } +// Touch partially implements the Sortable interface +func (i Item) Touch() int64 { + return i.Updated +} + // ContentID partially implements the Sortable interface func (i Item) ContentID() int { return i.ID -- cgit v1.2.3