In this recipe, we will learn how we can create a BSON document (a binary-encoded serialization of JSON-like documents) in a database, using a MongoDB driver for Go (gopkg.in/mgo.v2).
Creating your first document in MongoDB
Get Go Web Development Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.