m29h

u/m29h@feddit.nl
0 posts · 1 comments

Recent posts

No posts.

Recent comments

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.