This is a module dependency visualizer for go mod.
Modv's usage is different in different systems.
Install graphviz
. For Ubuntu/Debian
$ sudo apt-get install graphviz
For ArchLinux
$ sudo pacman -S --needed graphviz
Install modv
and use it.
$ go install github.com/poloxue/modv
$ go mod graph | modv | dot -T svg -o /tmp/modv.svg && xdg-open /tmp/modv.svg
$ brew install graphviz
$ go get github.com/poloxue/modv
Try the following.
$ go mod graph | modv | dot -T png | open -f -a /Applications/Preview.app
If error accured, for eaxmple,FSPathMakeRef(/Applications/Preview.app) failed with error -43.
,try the command:
$ go mod graph | modv | dot -T png | open -f -a /System/Applications/Preview.app
First, install graphviz
:
$ choco install graphviz.portable
For MSYS2
$ pacman -S mingw-w64-x86_64-graphviz
Try it.
$ go get github.com/poloxue/modv
$ go mod graph | modv | dot -T svg -o graph.svg; start graph.svg
If MacOS, tye the following:
$ git clone https://github.com/poloxue/testmod
$ cd testmod
$ go mod graph | modv | dot -T png | open -f -a /System/Applications/Preview.app
Output: