diff options
author | Michael Muré <batolettre@gmail.com> | 2019-08-12 16:12:14 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2019-08-12 16:12:14 +0200 |
commit | 99b5c58d43137bd9f6503788a55484327b0c531f (patch) | |
tree | 08ecc0f923b5f1fb4e8a7627aeabccb335d92ad1 /cache/bug_excerpt.go | |
parent | 67a3752e176790e82a48706236f889cab4f8913d (diff) | |
download | git-bug-99b5c58d43137bd9f6503788a55484327b0c531f.tar.gz |
finish the refactoring for the dedicated identifier type
Diffstat (limited to 'cache/bug_excerpt.go')
-rw-r--r-- | cache/bug_excerpt.go | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/cache/bug_excerpt.go b/cache/bug_excerpt.go index 8efc11e2..e053f9e4 100644 --- a/cache/bug_excerpt.go +++ b/cache/bug_excerpt.go @@ -18,7 +18,7 @@ func init() { // BugExcerpt hold a subset of the bug values to be able to sort and filter bugs // efficiently without having to read and compile each raw bugs. type BugExcerpt struct { - Id entity.ID + Id entity.Id CreateLamportTime lamport.Time EditLamportTime lamport.Time @@ -29,14 +29,14 @@ type BugExcerpt struct { Labels []bug.Label Title string LenComments int - Actors []entity.ID - Participants []entity.ID + Actors []entity.Id + Participants []entity.Id // If author is identity.Bare, LegacyAuthor is set // If author is identity.Identity, AuthorId is set and data is deported // in a IdentityExcerpt LegacyAuthor LegacyAuthorExcerpt - AuthorId string + AuthorId entity.Id CreateMetadata map[string]string } @@ -61,12 +61,12 @@ func (l LegacyAuthorExcerpt) DisplayName() string { } func NewBugExcerpt(b bug.Interface, snap *bug.Snapshot) *BugExcerpt { - participantsIds := make([]string, len(snap.Participants)) + participantsIds := make([]entity.Id, len(snap.Participants)) for i, participant := range snap.Participants { participantsIds[i] = participant.Id() } - actorsIds := make([]string, len(snap.Actors)) + actorsIds := make([]entity.Id, len(snap.Actors)) for i, actor := range snap.Actors { actorsIds[i] = actor.Id() } @@ -101,10 +101,6 @@ func NewBugExcerpt(b bug.Interface, snap *bug.Snapshot) *BugExcerpt { return e } -func (b *BugExcerpt) HumanId() string { - return bug.FormatHumanID(b.Id) -} - /* * Sorting */ |