diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-10-18 18:37:57 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-10-18 18:37:57 -0700 |
commit | 8aeec907a44a986b6c3975f13573b00a0043f67c (patch) | |
tree | 331be5137da43eb944fc6b58f6f96773ccf066b3 /content | |
parent | d594cbbea7f4297f1b581ad15643125f0db0c561 (diff) |
adding the Touch() method to Sortable interface, which would enable us to sort by updated time
Diffstat (limited to 'content')
-rw-r--r-- | content/item.go | 5 |
1 files changed, 5 insertions, 0 deletions
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 |