summaryrefslogtreecommitdiff
path: root/identity
diff options
context:
space:
mode:
Diffstat (limited to 'identity')
-rw-r--r--identity/identity.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/identity/identity.go b/identity/identity.go
index ee4dfea..1ae13c6 100644
--- a/identity/identity.go
+++ b/identity/identity.go
@@ -8,13 +8,15 @@ type Identity struct {
}
func (i Identity) Is(input string) bool {
- return Reduce(input) == i.Reduced
+ reduced := Reduce(input)
+ return i.Reduced == reduced
}
func New(input string) Identity {
+ reduced := Reduce(input)
return Identity{
Full: input,
- Reduced: Reduce(input),
+ Reduced: reduced,
}
}