aboutsummaryrefslogtreecommitdiffstats
path: root/identity/identity.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-01-19 16:01:06 +0100
committerMichael Muré <batolettre@gmail.com>2019-03-01 22:40:21 +0100
commit844616baf8dc628360942d57fd69f24e298e08da (patch)
tree3fd635e08a06de60618d47ab022554a1f78364de /identity/identity.go
parentbdbe9e7e8256fff820efe1ce707e7154d517ecb3 (diff)
downloadgit-bug-844616baf8dc628360942d57fd69f24e298e08da.tar.gz
identity: more progress and fixes
Diffstat (limited to 'identity/identity.go')
-rw-r--r--identity/identity.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/identity/identity.go b/identity/identity.go
index 3d523d38..313e3fd7 100644
--- a/identity/identity.go
+++ b/identity/identity.go
@@ -18,6 +18,16 @@ const identityConfigKey = "git-bug.identity"
var ErrIdentityNotExist = errors.New("identity doesn't exist")
+type ErrMultipleMatch struct {
+ Matching []string
+}
+
+func (e ErrMultipleMatch) Error() string {
+ return fmt.Sprintf("Multiple matching identities found:\n%s", strings.Join(e.Matching, "\n"))
+}
+
+var _ Interface = &Identity{}
+
type Identity struct {
id string
Versions []*Version