Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucasepe/modgv
Converts 'go mod graph' output into Graphviz's DOT language
https://github.com/lucasepe/modgv
dependencies golang graphviz viewer
Last synced: 19 days ago
JSON representation
Converts 'go mod graph' output into Graphviz's DOT language
- Host: GitHub
- URL: https://github.com/lucasepe/modgv
- Owner: lucasepe
- License: bsd-3-clause
- Created: 2020-09-12T16:23:46.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-23T09:21:20.000Z (almost 2 years ago)
- Last Synced: 2024-07-31T18:18:34.946Z (4 months ago)
- Topics: dependencies, golang, graphviz, viewer
- Language: Go
- Homepage:
- Size: 135 KB
- Stars: 484
- Watchers: 9
- Forks: 22
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - modgv - Converts 'go mod graph' output into Graphviz's DOT language. (Package Management / HTTP Clients)
- zero-alloc-awesome-go - modgv - Converts 'go mod graph' output into Graphviz's DOT language. (Package Management / HTTP Clients)
- my-awesome - lucasepe/modgv - 02 star:0.5k fork:0.0k Converts 'go mod graph' output into Graphviz's DOT language (Go)
- awesome-list - modgv
README
# modgv
[![Go Report Card](https://goreportcard.com/badge/github.com/lucasepe/modgv)](https://goreportcard.com/report/github.com/lucasepe/modgv) [![Go API Reference](https://img.shields.io/badge/go-docs-blue.svg?style=flat)](https://pkg.go.dev/github.com/lucasepe/modgv?tab=doc) [![Mentioned in Awesome Go](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go#package-management)
Converts 'go mod graph' output into [GraphViz](https://graphviz.gitlab.io/download/)'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:
```bash
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](https://github.com/lucasepe/modgv/releases) (macOS, Windows, Linux)
memo currently provides pre-built binaries for the following:
- macOS (Darwin)
- Windows
- Linux1. Download the appropriate version for your platform from [memo releases](https://github.com/lucasepe/modgv/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`](https://go.dev/dl/) toolchain
```bash
git clone https://github.com/lucasepe/modgv.git
cd modgv
go install
```Here 👉 https://graphviz.gitlab.io/download/ how to install [GraphViz](https://graphviz.gitlab.io/download/) for your OS.
## Sample output (PNG)
```bash
go mod graph | modgv | dot -Tpng -o graph.png
```![](./graph.png)
---
## Sample output (PDF with clickable links to module docs)
```bash
go mod graph | modgv | dot -Tps2 -o graph.ps
ps2pdf graph.ps graph.pdf
```