Gomodgraff is a utility to draw relationship between packages inside a Go module/project as dot diagram.
You can either build the binary yourself using make build
or you can just
prebuilt binary by downloading the latest releases from release page.
You can use these install scripts to download the latest version:
# install latest release to /usr/local/bin/
curl https://i.jpillora.com/avrebarra/gomodgraff! | *remove_this* bash
# install specific version
curl https://i.jpillora.com/avrebarra/gomodgraff@{version} | *remove_this* bash
# Show helps
$ gomodgraff -help
# Basic usages run in current directory
$ gomodgraff -only-internal
digraph sample {
"&cmd" -> "&modgraff";
"&main" -> "&cmd";
}
# Basic usages run in current directory, pipe to dot, and output a png
$ gomodgraff -only-internal | dot -Tpng -o gomodgraff.png