How would you rather debug a data structure?
memviz
takes a pointer to an arbitrary data structure and generates an easy to understand graph.
Simply pass in your data structure like so: memviz.Map(out, &data)
and then pipe the output into graphviz.
For more complete examples see the tests in memviz_test.go.
Using the memviz
output you can render the output directly as a png file (check out the implementation of at DataViz)
b := &bytes.Buffer{}
memviz.Map(foo, b)
dataviz_utils.WriteDotStringToPng(b.String(), "foo.png")