Closed loderunner closed 6 years ago
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed, please reply here (e.g. I signed it!
) and we'll verify. Thanks.
I signed it!
CLAs look good, thanks!
FromBytes
is a convenience constructor. It relies onUnmarshalBinary
to create a newUUID
. This makes creating a newUUID
from a slice a bytes clearer in the client code without having to create a temporary variable, and more consistent with creating a slice by parsing a string.Example:
I realize
FromBytes
is a bit of a name collision withParseBytes
. I am open to better suggestions for naming, of course. In fact, when discovering the library, I originally expectedParseBytes
to perform this copy.