bookends

commit 4b7f3c9af45f9cbdcc38cca7913cb21185069162

Author: Honza Pokorny <honza@redhat.com>

Remove DateRead type

 pkg/bookends/bookends.go | 10 +++-------


diff --git a/pkg/bookends/bookends.go b/pkg/bookends/bookends.go
index b7cc4af28b7ad27a44ec589d52ee90ab7d5b8d62..629241521eba880475c15397d4daafc1aa408610 100644
--- a/pkg/bookends/bookends.go
+++ b/pkg/bookends/bookends.go
@@ -41,15 +41,11 @@ 	CoversDir       string
 	OutputFilename  string
 }
 
-type DateRead struct {
-	time.Time
-}
-
 type Book struct {
 	Author   string
 	Title    string
 	ISBN     string
-	DateRead DateRead
+	DateRead time.Time
 	Rating   int
 	Review   template.HTML
 	Tags     []string
@@ -60,7 +56,7 @@
 func (r BooksByDateRead) Len() int      { return len(r) }
 func (r BooksByDateRead) Swap(i, j int) { r[i], r[j] = r[j], r[i] }
 func (r BooksByDateRead) Less(i, j int) bool {
-	return r[i].DateRead.Time.After(r[j].DateRead.Time)
+	return r[i].DateRead.After(r[j].DateRead)
 }
 
 func PathExists(path string) bool {
@@ -214,7 +210,7 @@ 						dt, err := time.Parse("CLOSED: [2006-01-02 Mon 15:04]", s)
 						if err != nil {
 							return books, err
 						}
-						book.DateRead = DateRead{dt}
+						book.DateRead = dt
 						continue
 					}