Avatar

m29h

m29h@feddit.nl
Joined
0 posts • 1 comments
Direct message

Why don’t you just set the id to whatever ( e.g UUID) you want in your struct constructor. Alternatively I guess there are also mongodb specific client libraries for Go

The documentation of package mongo says for example ``` If the document does not have an _id field when transformed into BSON, one will be added automatically to the marshalled document.

permalink
report
reply