Skip to content

Instantly share code, notes, and snippets.

View oshalygin's full-sized avatar

Oleg Shalygin oshalygin

  • Los Angeles, CA
View GitHub Profile
@oshalygin
oshalygin / mongodb_lookup.go
Created May 28, 2018 02:34 — forked from sindbach/mongodb_lookup.go
A simple example of how to use $lookup in Golang using mgo.
package main
import (
"fmt"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
session, err := mgo.Dial("localhost")
if err != nil {