aboutsummaryrefslogtreecommitdiffstats
path: root/cache/identity_excerpt.go
diff options
context:
space:
mode:
Diffstat (limited to 'cache/identity_excerpt.go')
-rw-r--r--cache/identity_excerpt.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/cache/identity_excerpt.go b/cache/identity_excerpt.go
index 126c712b..79d88537 100644
--- a/cache/identity_excerpt.go
+++ b/cache/identity_excerpt.go
@@ -5,7 +5,6 @@ import (
"fmt"
"strings"
- "github.com/MichaelMure/git-bug/entities/identity"
"github.com/MichaelMure/git-bug/entity"
)
@@ -14,6 +13,8 @@ func init() {
gob.Register(IdentityExcerpt{})
}
+var _ Excerpt = &IdentityExcerpt{}
+
// IdentityExcerpt hold a subset of the identity values to be able to sort and
// filter identities efficiently without having to read and compile each raw
// identity.
@@ -25,7 +26,7 @@ type IdentityExcerpt struct {
ImmutableMetadata map[string]string
}
-func NewIdentityExcerpt(i *identity.Identity) *IdentityExcerpt {
+func NewIdentityExcerpt(i *IdentityCache) *IdentityExcerpt {
return &IdentityExcerpt{
id: i.Id(),
Name: i.Name(),
@@ -34,6 +35,10 @@ func NewIdentityExcerpt(i *identity.Identity) *IdentityExcerpt {
}
}
+func (i *IdentityExcerpt) setId(id entity.Id) {
+ i.id = id
+}
+
func (i *IdentityExcerpt) Id() entity.Id {
return i.id
}