Closed fulviodenza closed 1 year ago
There's no difference in format between a v1 or v4, you could probably use this to generate an empty uuid https://github.com/google/uuid/blob/44b5fee7c49cf3bcdf723f106b36d56ef13ccc88/hash.go#L19
https://www.sohamkamani.com/uuid-versions-explained/#how-are-uuids-structured
Alexi is correct.
But just to be clear, the uuid.Nil is nil for every version (all zeros). v1 and v4 UUIDs themselves are very different in how the bits are computed and treated.
On Jul 28, 2023, at 5:22 PM, Alexis Coulombe @.***> wrote:
There's no difference in format between a v1 or v4, you could probably use this https://github.com/google/uuid/blob/44b5fee7c49cf3bcdf723f106b36d56ef13ccc88/hash.go#L19 so generate an empty uuid
https://www.sohamkamani.com/uuid-versions-explained/#how-are-uuids-structured
— Reply to this email directly, view it on GitHub https://github.com/google/uuid/issues/104#issuecomment-1656396276, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHBAHMBXDMA6GBLJEYNRTLXSQ3STANCNFSM5Y3FN6IQ. You are receiving this because you are subscribed to this thread.
Hi! I noticed there is a uuid.Nil for UUID v1 but no uuid.Nil (for example uuid.Nil4) for UUID v4 could be useful adding this method to the library? (I could also make a PR)