diff options
author | Michael Muré <batolettre@gmail.com> | 2022-12-21 21:54:36 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2022-12-21 21:54:36 +0100 |
commit | 9b98fc06489353053564b431ac0c0d73a5c55a56 (patch) | |
tree | 67cab95c0c6167c0982516a2dda610bd5ece9eab /cache/identity_excerpt.go | |
parent | 905c9a90f134842b97e2cf729d8b11ff59bfd766 (diff) | |
download | git-bug-9b98fc06489353053564b431ac0c0d73a5c55a56.tar.gz |
cache: tie up the refactor up to compiling
Diffstat (limited to 'cache/identity_excerpt.go')
-rw-r--r-- | cache/identity_excerpt.go | 9 |
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 } |