From c58770eb495f55fe2ced6284f93c5158a62e53e3 Mon Sep 17 00:00:00 2001 From: MikeWang Date: Wed, 10 Jan 2024 00:54:05 +0800 Subject: [PATCH] feat: add Max UUID constant (#149) add Max uuid --- hash.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hash.go b/hash.go index b404f4b..dc60082 100644 --- a/hash.go +++ b/hash.go @@ -17,6 +17,12 @@ var ( NameSpaceOID = Must(Parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8")) NameSpaceX500 = Must(Parse("6ba7b814-9dad-11d1-80b4-00c04fd430c8")) Nil UUID // empty UUID, all zeros + + // The Max UUID is special form of UUID that is specified to have all 128 bits set to 1. + Max = UUID{ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + } ) // NewHash returns a new UUID derived from the hash of space concatenated with