In a book about DI, you can expect us to spend a lot of time talking about dependencies. Dependencies at the lowest level, functions, structs, and interfaces are easy to visualize; we can just read the code or, if we want a pretty picture, we can make a class diagram like the following:
If we zoom out to the package level and try to map the dependencies between packages, then life gets a lot more difficult. This is where we rely again on the open source community's wealth of open-source tools. This time, we will need two tools called godepgraph and Graphviz (http://www.graphviz.org/). Godepgraph is a program for generating a dependency graph of Go packages, and Graphviz is a source graph-visualization software.