Integrating MongoDB and Go

Whenever you want to persist data in a MongoDB database, the first step you have to take is to establish a connection between the database and your web application, which we will be covering in this recipe using one of the most famous and commonly used MongoDB drivers for Go - gopkg.in/mgo.v2.

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.