Open inliquid opened 5 years ago
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). 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 (or fixed any issues), please reply here (e.g. I signed it!
) and we'll verify it.
Since you added go.mod
to repo I had to change it to point to my own repo, otherwise I wasn't be able to use it. Keep in mind that you need to change it back.
this would be super useful for my purposes
@frednomoon
Thanks. Not sure if this gonna be merged, but you can use either my repo (https://github.com/inliquid/uuid) or fork it for yourself. Note, that if you are using modules, you have to run go get github.com/<repo>@<commit_id>
to grab latest changes and update go.mod
of your project, because there is no version tag, and it won't be updated automatically.
Sorry for the delay in response. This change will create an extra dependency for every package that includes the uuid package. Since uuids have a very fixed form, it would be better to just generate the encoded version directly and not use the extra package. I am a little concerned that we will end up adding marshalling/unmarshalling for every various type of encoding.
Another approach to supporting UUIDs for BSON directly in your client project is to use the RegisterTypeEncoder
functions, example here: https://github.com/looplab/eventhorizon/blob/main/codec/bson/uuid.go
what? no
Updated the link, if the comment was about that.
Added support for marshaling/unmarshaling of MongoDB's BSON UUID binary format by implementing bson.Getter/Setter interfaces