modgv

command module
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: BSD-3-Clause Imports: 6 Imported by: 1

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

Documentation

Overview

modgv 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 | modgv > graph.dot
go mod graph | modgv | dot -Tpng -o graph.png

modgv 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.

Directories

Path Synopsis
internal
modgv module

Jump to

Keyboard shortcuts

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