Giter Site home page Giter Site logo

modgv's Introduction

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


Sample output (PDF with clickable links to module docs)

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

modgv's People

Contributors

jpalardy avatar lucasepe avatar minus7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

modgv's Issues

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

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.