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.33k stars 369 forks source link

Parse/unint64s #14

Closed sjeandeaux closed 7 years ago

sjeandeaux commented 7 years ago

Add representation of UUID with two longs (uint64)

pborman commented 7 years ago

What is the use case for this addition?

sjeandeaux commented 7 years ago

In some world like java, we use the representation on two longs. I propose a parsing method allowing to pass from this representation to the UUID.

sjeandeaux commented 7 years ago

The documentation java

pborman commented 7 years ago

Thanks for the reference @sjeandeaux. This functionality can be completely done outside of the package. I would think if you were interacting with Java that you probably already have a package that deals with Java <-> Go conversions. This would be one of them. I agree it would be convenient for you if they were in the Go package, but I am a bit troubled by adding in Java hooks. We did add hooks for SQL, but those could not be implemented outside of the package. Do you have any thought of how many other developers would be affected by this?

sjeandeaux commented 7 years ago

@pborman you're right. i close the pull-request. I thank you for having taken the time to read this PR.