Closed dambrisco closed 1 year ago
Looks like I accidentally stomped on some code in a rebase, I'll get that fixed.
Fixed.
I just saw this after I posted my PR :( https://github.com/globalsign/mgo/pull/357
Yours is more flexible, but looks like it does not support string pointer, which is much more useful than array...
@ilius It should be fairly straightforward to add string pointer support to my code. I can look into doing that within the next week.
Oh crud! My PR is based on master, and looks like the upstream master is not merged into development for a while and there are conflicts!
I think we better pass info *fieldInfo
argument (to addElem or readElemTo) instead of boolean, so that we don't have to keep adding arguments for each flag.
Please take a look if you may: https://github.com/globalsign/mgo/pull/357 I'm closing my PR.
Resolves #98 by way of the discussed
"objectid"
tag.Specifically, this PR adds support for aliasing
[]byte
andstring
fields to and from ObjectIds. Other types are not supportable at this time, at least without fairly contrived scenarios like 3-length arrays of Int32, but adding support for other types in the future should be fairly easy if needed.