From 374ed5e1a4dc635c42e33e4133729d40cf3e0e35 Mon Sep 17 00:00:00 2001 From: ewy Date: Wed, 22 Apr 2026 18:29:37 +0200 Subject: work on tests also replace the annoying search return with a struct --- identity/identity.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'identity') 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, } } -- cgit v1.3.1