mirror of
https://github.com/duke-git/lancet.git
synced 2026-11-16 05:12:11 +08:00
Merge branch 'v2' into rc
This commit is contained in:
commit
be45a259db
6 files changed
+182
-77
No files matched your search
+1
-1
@@ -1008,7 +1008,7 @@ func TestUniqueByComparator(t *testing.T) {
|
||||
t.Run("case-insensitive string comparison", func(t *testing.T) {
|
||||
stringSlice := []string{"apple", "banana", "Apple", "cherry", "Banana", "date"}
|
||||
caseInsensitiveComparator := func(item, other string) bool {
|
||||
return strings.ToLower(item) == strings.ToLower(other)
|
||||
return strings.EqualFold(item, other)
|
||||
}
|
||||
|
||||
result := UniqueByComparator(stringSlice, caseInsensitiveComparator)
|
||||
|
||||
Reference in new issue
Block a user