For golang std lib, since packages have no circular deps, it can be automatically drawn out like this:
http://lonnie.io/gostd/dagvis/
If you write your project that even has no circular deps among files and all files are small (like me in https://github.com/h8liu/e8vm), you can draw the similar graph but at a much finer granularity, like this: