-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
proposal: add uuid generator to stdlib #23789
Comments
The bar for inclusion in the standard library is very high: and it kind of works backwards: first you need working, stable code and then submit a proposal for inclusion. Criterias are also not very clear at the moment, unfortunately. Do you have some specific existing library that you want to propose for inclusion? I see there are already a few out there. |
I thought this had come up in the past, but I at least can't find it on the issue tracker. Maybe it was the mailing list. But I'm pretty sure it was rejected previously. I'll keep this open, though. |
Have the x repos been considered for such a package, instead of the standard library? |
@mvdan wasn't there an issue a while back about freezing new x/ repos? |
@ericlagergren doesn't ring a bell, and I can't find such an issue now. Specific packages may be frozen, but I don't know about any general freeze rule on existing (or new) x repos. |
@dominikh yep, thanks. That's what I was remembering. |
Proposal: in crypto/rand, add
only returns random UUIDs, not all the other ones. |
(For those Googling for the UUID spec, the correct RFC number is 4122.) |
A UUID generator in the stdlib that only supports one version and one
string format is kind of awkward, IMO. Inevitably, somebody will want
Microsoft’s {UUID in braces} or urn:uuid:1234... and then they’re back to
square one. Generally, whenever I’ve worked with UUIDs we’ve kept them as
[16]byte until they need to be sent in text format.
Le lun. 26 févr. 2018 à 13:50, Russ Cox <notifications@github.com> a écrit :
… Proposal: in crypto/rand, add
func UUID(rand io.Reader) (string, error)
only returns random UUIDs, not all the other ones.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23789 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFnwZy-SSLmShh0il6s-W2agXQYZG66mks5tYycmgaJpZM4SB99P>
.
|
I'm withdrawing my proposal for crypto/rand. I don't have enough evidence that this is sufficient. |
I don't think we have enough information about what is needed in the standard library. I think for now the answer is to keep using third-party packages. |
Currently we generate uuid/guid with external packages or original implementations using crypto/rand etc...
And in some cases you use other languages' library...
As I argued on golang-nuts, I propose to implement the generator as a standard package.
https://groups.google.com/forum/#!topic/golang-nuts/J_htXsnVjdY
RFC4122 defines the specification of UUID representation.
And at first, how's to support uuid v4 package to create random ids?
The text was updated successfully, but these errors were encountered: