Home

Awesome

modgv

Go Report Card     Go API Reference     Mentioned in Awesome Go

Converts 'go mod graph' output into GraphViz's DOT language.

Usage:

go mod graph | modgv | dot -Tpng -o graph.png

For each module:

Installation

From binary releases (macOS, Windows, Linux)

memo currently provides pre-built binaries for the following:

  1. Download the appropriate version for your platform from memo releases.

  2. Once downloaded unpack the archive (zip for Windows; tarball for Linux and macOS) to extract the executable binary.

  3. If you want to use from any location you must put the binary executable to your Path or add the directory where is it to the environment variables.

Using Go toolchain

git clone https://github.com/lucasepe/modgv.git
cd modgv
go install

Here 👉 https://graphviz.gitlab.io/download/ how to install GraphViz for your OS.

Sample output (PNG)

go mod graph | modgv | dot -Tpng -o graph.png


Sample output (PDF with clickable links to module docs)

go mod graph | modgv | dot -Tps2 -o graph.ps
ps2pdf graph.ps graph.pdf