Skip to content
Module relationship visualization tool
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Article_CN.md
README.md
go.mod init project Oct 22, 2019
graph.go
graph_test.go
main.go readme add usage demo Oct 25, 2019

README.md

This is a module dependency visualizer for go mod.

Usage

Modv's usage is different in different systems.

Linux

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

MacOS

$ 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

Windows

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

Demo

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:

You can’t perform that action at this time.