lucasepe/modgv

Converts 'go mod graph' output into Graphviz's DOT language

Go

489

13 commits

updated Feb 23, 2023

See the code

README

modgv

Go Report Card     Go API Reference     Mentioned in Awesome Go

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

  • takes no options or arguments
  • it reads the output generated by “go mod graph” on stdin
  • generates a DOT language and writes to stdout

Usage:

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

For each module:

  • the node representing the greatest version (i.e., the version chosen by Go's MVS algorithm) is colored green
  • other nodes, which aren't in the final build list, are colored grey

Installation

From binary releases (macOS, Windows, Linux)

memo currently provides pre-built binaries for the following:

  • macOS (Darwin)
  • Windows
  • Linux
  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


go mod graph | modgv | dot -Tps2 -o graph.ps
ps2pdf graph.ps graph.pdf
dependencies
golang
graphviz
viewer

Project health

Latest release

v0.2.4 · Feb 23, 2023

Releases this year

0

Significant stargazers

Bjørn Erik Pedersen

2,510 followers · starred Sep 2020

Yoan Blanc

312 followers · starred Sep 2020

Andrey Smirnov

406 followers · starred Sep 2020

Ivan Trubach

55 followers · starred Sep 2020

lucasepe/modgv

Converts 'go mod graph' output into Graphviz's DOT language

Go

489

13 commits

updated Feb 23, 2023

See the code

README

modgv

Go Report Card     Go API Reference     Mentioned in Awesome Go

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

  • takes no options or arguments
  • it reads the output generated by “go mod graph” on stdin
  • generates a DOT language and writes to stdout

Usage:

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

For each module:

  • the node representing the greatest version (i.e., the version chosen by Go's MVS algorithm) is colored green
  • other nodes, which aren't in the final build list, are colored grey

Installation

From binary releases (macOS, Windows, Linux)

memo currently provides pre-built binaries for the following:

  • macOS (Darwin)
  • Windows
  • Linux
  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


go mod graph | modgv | dot -Tps2 -o graph.ps
ps2pdf graph.ps graph.pdf
dependencies
golang
graphviz
viewer

Project health

Latest release

v0.2.4 · Feb 23, 2023

Releases this year

0

Significant stargazers

Bjørn Erik Pedersen

2,510 followers · starred Sep 2020

Yoan Blanc

312 followers · starred Sep 2020

Andrey Smirnov

406 followers · starred Sep 2020

Ivan Trubach

55 followers · starred Sep 2020