aboutsummaryrefslogtreecommitdiffstats
path: root/cache/bug_excerpt.go
diff options
context:
space:
mode:
Diffstat (limited to 'cache/bug_excerpt.go')
-rw-r--r--cache/bug_excerpt.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/cache/bug_excerpt.go b/cache/bug_excerpt.go
index 23ac459b..572f461a 100644
--- a/cache/bug_excerpt.go
+++ b/cache/bug_excerpt.go
@@ -1,6 +1,8 @@
package cache
import (
+ "encoding/gob"
+
"github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/util"
)
@@ -19,7 +21,7 @@ type BugExcerpt struct {
Author bug.Person
}
-func NewBugExcerpt(b *bug.Bug, snap bug.Snapshot) BugExcerpt {
+func NewBugExcerpt(b bug.Interface, snap *bug.Snapshot) BugExcerpt {
return BugExcerpt{
Id: b.Id(),
CreateLamportTime: b.CreateLamportTime(),
@@ -31,6 +33,11 @@ func NewBugExcerpt(b *bug.Bug, snap bug.Snapshot) BugExcerpt {
}
}
+// Package initialisation used to register the type for (de)serialization
+func init() {
+ gob.Register(BugExcerpt{})
+}
+
/*
* Sorting
*/