aboutsummaryrefslogtreecommitdiff
path: root/lib/uuidv7/uuidv7.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/uuidv7/uuidv7.go')
-rw-r--r--lib/uuidv7/uuidv7.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/uuidv7/uuidv7.go b/lib/uuidv7/uuidv7.go
index e2185c24..5aac01bb 100644
--- a/lib/uuidv7/uuidv7.go
+++ b/lib/uuidv7/uuidv7.go
@@ -99,6 +99,11 @@ func (id *UUIDv7) Equal(v any) (err error) {
return nil
}
+// IsEqual returns true if id equal with other.
+func (id UUIDv7) IsEqual(other UUIDv7) bool {
+ return id.high == other.high && id.low == other.low
+}
+
// IsZero returns true if all bits is zero.
func (id UUIDv7) IsZero() bool {
return id.high == 0 && id.low == 0