google / uuid

Go package for UUIDs based on RFC 4122 and DCE 1.1: Authentication and Security Services.
BSD 3-Clause "New" or "Revised" License
5.26k stars 362 forks source link

Allow concurrent, re-creatable usage #43

Closed trabetti closed 5 years ago

trabetti commented 5 years ago

Hi, I am using this package to generate uuids for a test generator. I have a use case where multiple instances of the generator run asynchronously to create tests. I need to be able to recreate failed tests, the current implementation holds only one seed, so there is no way to ensure recreation when processes are running asynchronously. I have forked the repository and added a UuidSource, similar to a source in math/rand, which holds the rander, this solves my use case. I suggest to do a PR from my fork.

pborman commented 5 years ago

Sure, send me what you have.

ahobson commented 4 years ago

Any chance of a making a release with these changes?

pborman commented 4 years ago

Oh, sorry! I will make release 1.2 now.

pborman commented 4 years ago

Released as 1.1.2 (changes are too minor to be a 1.2 release). Thank you for pointing this out.