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

modgv

Go Report Card     Go Coverage     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

go get github.com/lucasepe/modgv/modgv

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

View generated PDF

Owner
Luca Sepe
𝕋𝕖𝕔𝕙 - Golang | C | [Java]. Design multi-platform pipelines, web scrapers, data ingestion tools.
Luca Sepe
Similar Resources

JSONL graph tools - Graph is represented as JSONL of nodes and edges.

JSONL graph tools - Graph is represented as JSONL of nodes and edges.

Sep 27, 2022

The DGL Operator makes it easy to run Deep Graph Library (DGL) graph neural network training on Kubernetes

DGL Operator The DGL Operator makes it easy to run Deep Graph Library (DGL) graph neural network distributed or non-distributed training on Kubernetes

Dec 19, 2022

golang program that simpily converts html into markdown

Simpily converts html to markdown Just a simple project I wrote in golang to convert html to markdown, surprisingly works decent for a lot of websites

Oct 23, 2021

Converts a database into gorm structs and RESTful api

gen The gen tool produces a CRUD (Create, read, update and delete) REST api project template from a given database. The gen tool will connect to the d

Dec 28, 2022

Simple go script that converts csv file into a json document

csv-go-parser Simple go script that converts csv file into a json document. CSV Input: id,first_name,last_name,email,avatar,ip_address 1,Pauline,Hirth

Jun 4, 2022

Converts an image file into various WebP images to use with img srcset

go-websizer Converts an image file into various WebP images to use with img srcset. Install $ go get github.com/pipe01/go-websizer Usage Usage of go-

Oct 7, 2021

This command line converts .html file into .html with images embed.

embed-html This command line converts .html file into .html with images embed. Install go get github.com/gonejack/embed-html Usage embed-html *.ht

Oct 6, 2022

A simple tool to extract Fronius solar data logger output and output Influx line protocol

telegraf-exec-fronius This is a simple tool to extract Fronius solar data logger output and output Influx line protocol; it is designed to be used wit

Jan 8, 2022

Decode / encode XML to/from map[string]interface{} (or JSON); extract values with dot-notation paths and wildcards. Replaces x2j and j2x packages.

mxj - to/from maps, XML and JSON Decode/encode XML to/from map[string]interface{} (or JSON) values, and extract/modify values from maps by key or key-

Dec 22, 2022

Decode / encode XML to/from map[string]interface{} (or JSON); extract values with dot-notation paths and wildcards. Replaces x2j and j2x packages.

mxj - to/from maps, XML and JSON Decode/encode XML to/from map[string]interface{} (or JSON) values, and extract/modify values from maps by key or key-

Dec 29, 2022

A tiny command line DNS client with support for UDP, DoT, DoH, and DoQ.

A tiny command line DNS client with support for UDP, DoT, DoH, and DoQ.

q A tiny command line DNS client with support for UDP, DoT, DoH, and DoQ. Usage q command line DNS client (https://github.com/natesales/q) Usage: q

Jan 4, 2023

🔄 Maintain a local copy of you dot files

Dotup This command line is in charge of maintaining a local copy of you dot files from a source folder. It copies all the files in the source fold

Oct 20, 2021

DNS/DoT to DoH proxy with load-balancing, fail-over and SSL certificate management

dns-proxy Configuration Variable Example Description TLS_DOMAIN my.duckdns.org Domain name without wildcards. Used to create wildcard certificate and

Oct 26, 2022

Access and modify property values in deeply nested maps, using dot-separated paths

Dig lets you access and modify property values in deeply nested, unstructured maps, using dot-separated paths: source := make(map[string]interface{})

May 7, 2022

K8s-dotenv - Kubernetes Secrets and Configmaps to dot env file

k8s-dotenv A commandline tool to fetch, merge and convert secrets and config map

Apr 22, 2022

yml2dot - Turn YAML into beautiful Graph

yml2dot - Turn YAML into beautiful Graph

yml2dot - Turn YAML into beautiful Graph Use Cases Visualize your YAML files as Graph Generate additional info from your source code

Dec 30, 2022

The forgotten go tool that executes and caches binaries included in go.mod files.

The forgotten go tool that executes and caches binaries included in go.mod files.

The forgotten go tool that executes and caches binaries included in go.mod files. This makes it easy to version cli tools in your projects such as gol

Sep 27, 2022

GoThanks automatically stars Go's official repository and your go.mod github dependencies, providing a simple way to say thanks to the maintainers of the modules you use and the contributors of Go itself.

GoThanks automatically stars Go's official repository and your go.mod github dependencies, providing a simple way  to say thanks to the maintainers of the modules you use and the contributors of Go itself.

Give thanks (in the form of a GitHub ★) to your fellow Go modules maintainers. About GoThanks performs the following operations Sends a star to Go's r

Dec 24, 2022
Comments
  • graph is too large

    graph is too large

    Dear Lucasepe, trying to user your brilliant tool but getting an issue :)

    using it on nvim; is this an expected behavior? Are there flags/ arguments that we could pass to allow the graph/image to be generated elsewhere?

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

    command i issued:

    response i got (it actually took too long to response so i crtl+c the process and got this:) graph is too large for cairo-renderer bitmaps. Scaling by 0.196394 to fit

  • Fix nodesep

    Fix nodesep

    Hi @lucasepe,

    I love graphviz too 😃

    I noticed the output for nodesep was mangled. Here's a quick fix.

    Tests don't seem setup, manually tested locally.

  • support highlight

    support highlight

    Support highlights the dependence path of specified modules. This is useful when doing a dependency analysis for a project which has a large mod graph.

  • Deprecation of 'go get' for installing executables

    Deprecation of 'go get' for installing executables

    Hi! Thanks for your job!

    the described installation method (installation) doesn't work in Go 1.17 or later. Reason: Deprecation of 'go get' for installing executables.

    I've tried to use go install:

    $ go install github.com/lucasepe/modgv/modgv@latest
    go install: github.com/lucasepe/modgv/modgv@latest (in github.com/lucasepe/modgv/[email protected]):
    	The go.mod file for the module providing named packages contains one or
    	more replace directives. It must not contain directives that would cause
    	it to be interpreted differently than if it were the main module.
    
    $ go install github.com/lucasepe/modgv/[email protected]
    go install: github.com/lucasepe/modgv/[email protected]: module github.com/lucasepe/[email protected] found, but does not contain package github.com/lucasepe/modgv/modgv
    
    $ go install github.com/lucasepe/[email protected]
    package github.com/lucasepe/modgv is not a main package
    

    FYI.

Draw graphs through GO MOD GRAPH output
Draw graphs through GO MOD GRAPH output

go-mod-graph-chart build chart by go mod graph output Install $ go get -u github.com/PaulXu-cn/go-mod-graph-chart/gmchart Usage

Dec 14, 2022
The go mod init command initializes and writes a new go.mod file in the current directory

go mod: The go mod init command initializes and writes a new go.mod file in the current directory, in effect creating a new module rooted at the curre

Nov 21, 2021
Reads MAWS formatted data and converts it into JSON output stream.

maws2json Usage examples Over serial line (stdin pipe) Lets assume that Vaisala weather station is connected via RS232 to USB serial dongle in /dev/tt

Feb 6, 2022
A tiny markup language for terminal output. Makes formatting output in CLI apps easier!
A tiny markup language for terminal output. Makes formatting output in CLI apps easier!

tml - Terminal Markup Language A Go module (and standalone binary) to make the output of coloured/formatted text in the terminal easier and more reada

Dec 14, 2022
GoLobby DotEnv is a lightweight package for loading dot env (.env) files into structs for Go projects

DotEnv GoLobby DotEnv is a lightweight package for loading dot env (.env) files into structs for Go projects Documentation Supported Versions It requi

Dec 30, 2022
WIP. Converts Azure Container Scan Action output to SARIF, for an easier integration with GitHub Code Scanning

container-scan-to-sarif container-scan-to-sarif converts Azure Container Scan Action output to Static Analysis Results Interchange Format (SARIF), for

Jan 25, 2022
Parses the Graphviz DOT language in golang

Parses the Graphviz DOT language and creates an interface, in golang, with which to easily create new and manipulate existing graphs which can be writ

Dec 25, 2022
Parses the Graphviz DOT language in golang

Parses the Graphviz DOT language and creates an interface, in golang, with which to easily create new and manipulate existing graphs which can be writ

Dec 25, 2022
Ltree Visualizer - A golang library to visualize postgres ltree type data using DOT language and Graphviz
Ltree Visualizer - A golang library to visualize postgres ltree type data using DOT language and Graphviz

Ltree Visualizer A golang library to visualize postgres ltree type data using DOT language and Graphviz What is Ltree? Ltree is a data type which is u

Jun 12, 2022
Go package for writing descriptions using the Graphviz DOT language
Go package for writing descriptions using the Graphviz DOT language

dot - little helper package in Go for the graphviz dot language

Nov 30, 2022