MongoDB and Go, a pair meant to be together!
I’ve recently been working on a start-up that’s afforded me the need to get better acquainted with Mongodb and Go. Quickly working with these two technologies, one feels that they were meant for each other. Throw in the json package and you’re cooking with Gasoline!
The fun begins when you go wild with the use of map[string]interface{} and []map[string]interface{}. At first glance to the noob, these are daunting looking type definitions. But with a little experimenting to get you legs underneath you, you’ll find that you coudn’t live without these guys! And for good measure, their big brother, interface{}, is pretty handy too when you want to generically throw these guys around and inspect them through Go’s reflect package to see what type you’re dealing with at runtime.
Here’s the driver that I find works nicely with mongodb
More later…