Filter.Clone()

This commit is contained in:
fiatjaf
2023-11-06 18:35:11 -03:00
parent d6baa2f74c
commit f5cd0c1140
3 changed files with 79 additions and 2 deletions

View File

@@ -93,3 +93,13 @@ func IsValidRelayURL(u string) bool {
}
return true
}
func arePointerValuesEqual[V comparable](a *V, b *V) bool {
if a == nil && b == nil {
return true
}
if a != nil && b != nil {
return *a == *b
}
return false
}