fix: fix issue for PR #334, usge Pair struct to instance enum items

This commit is contained in:
dudaodong committed 2025-10-16 18:43:24 +08:00
1 parent cd43004a91
commit 3f12b34eea
5 files changed
+83 -94

No files matched your search

+3 -3
View File
@@ -21,9 +21,9 @@ func TestNewItem(t *testing.T) {
t.Parallel()
assert := internal.NewAssert(t, "TestNewItem")
items := NewItems[Status](
Active, "Active",
Inactive, "Inactive",
items := NewItems(
Pair[Status]{Value: Active, Name: "Active"},
Pair[Status]{Value: Inactive, Name: "Inactive"},
)
assert.Equal(2, len(items))