-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a method to generate empty UUID v4? #104
Comments
fulviodenza
changed the title
Is there a method to generate UUID v4?
Is there a method to generate empty UUID v4?
Jun 15, 2022
There's no difference in format between a v1 or v4, you could probably use this to generate an empty uuid Line 19 in 44b5fee
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 <#104 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABHBAHMBXDMA6GBLJEYNRTLXSQ3STANCNFSM5Y3FN6IQ>.
You are receiving this because you are subscribed to this thread.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)
The text was updated successfully, but these errors were encountered: