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, 3 insertions, 6 deletions
diff --git a/cache/identity_excerpt.go b/cache/identity_excerpt.go
index 3ac13903..18514e9a 100644
--- a/cache/identity_excerpt.go
+++ b/cache/identity_excerpt.go
@@ -5,6 +5,7 @@ import (
"fmt"
"strings"
+ "github.com/MichaelMure/git-bug/entity"
"github.com/MichaelMure/git-bug/identity"
)
@@ -17,7 +18,7 @@ func init() {
// filter identities efficiently without having to read and compile each raw
// identity.
type IdentityExcerpt struct {
- Id string
+ Id entity.Id
Name string
Login string
@@ -33,10 +34,6 @@ func NewIdentityExcerpt(i *identity.Identity) *IdentityExcerpt {
}
}
-func (i *IdentityExcerpt) HumanId() string {
- return identity.FormatHumanID(i.Id)
-}
-
// DisplayName return a non-empty string to display, representing the
// identity, based on the non-empty values.
func (i *IdentityExcerpt) DisplayName() string {
@@ -54,7 +51,7 @@ func (i *IdentityExcerpt) DisplayName() string {
// Match matches a query with the identity name, login and ID prefixes
func (i *IdentityExcerpt) Match(query string) bool {
- return strings.HasPrefix(i.Id, query) ||
+ return i.Id.HasPrefix(query) ||
strings.Contains(strings.ToLower(i.Name), query) ||
strings.Contains(strings.ToLower(i.Login), query)
}