Tags.Eq()

This commit is contained in:
fiatjaf
2026-05-04 10:16:08 -03:00
parent aafff41d40
commit c75bd45d13
+16
View File
@@ -124,3 +124,19 @@ func (tags Tags) ContainsAny(tagName string, values []string) bool {
return false
}
func (tags Tags) Eq(other Tags) bool {
if len(tags) != len(other) {
return false
}
for i, tag := range tags {
otherTag := other[i]
if !slices.Equal(tag, otherTag) {
return false
}
}
return true
}