gomodv

command module
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

README

gomodv

Go Report Card     Go Coverage     Go API Reference

This is a modified version of modgraphviz and forked from lucasepe/modgv.

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 | gomodv | 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 blue.
  • other nodes, which aren't in the final build list, are colored grey

Installation

go get github.com/smallnest/gomodv

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

Sample output (PNG)

go mod graph | gomodv | dot -Tpng -o graph2.png

In short mode and not render unpicked:

go mod graph | gomodv -s -unpicked=false| dot -Tpng -o graph.png

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

View generated PDF

Documentation

Overview

gomodv converts “go mod graph” output into Graphviz's DOT language, for use with Graphviz visualization and analysis tools like dot, dotty, and sccmap.

Usage:

go mod graph | gomodv > graph.dot
go mod graph | gomodv | dot -Tpng -o graph.png

gomodv takes no options or arguments; it reads a graph in the format generated by “go mod graph” on standard input and writes DOT language on standard output.

For each module, the node representing the greatest version (i.e., the version chosen by Go's minimal version selection algorithm) is colored green. Other nodes, which aren't in the final build list, are colored grey.

See http://www.graphviz.org/doc/info/lang.html for details of the DOT language and http://www.graphviz.org/about/ for Graphviz itself.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL