Code Monkey home page Code Monkey logo

graphdot's Introduction

graphdot

Visualize Go module dependencies in Graphviz DOT format


Installation

Install graphdot using go get:

go get -u github.com/ewohltman/graphdot

Usage

Run graphdot in the directory of any project using Go modules with a go.mod file to print out a dependency graph in Graphviz DOT format.

The output can be piped directly into dot to generate a PNG image file:

graphdot | dot -T png -o dependency_graph.png

For large graphs with many nodes of dependencies, you may want to generate an SVG file to allow you to zoom in with high-fidelity and save disk space instead:

graphdot | dot -Gdpi=0 -T svg -o dependency_graph.svg

If you like a more UML'ish style, you can use the provided graph properties from uml.gprops:

graphdot -graph-props uml.gprops | dot -T svg -o dependency_graph.svg

Example

graphdot

Contributing to the project

Contributions are very welcome, however please follow the guidelines below:

  • Open an issue describing the bug or enhancement
  • Fork the develop branch and make your changes
    • Try to match current naming conventions as closely as possible
  • Create a Pull Request with your changes against the develop branch

graphdot's People

Contributors

ewohltman avatar mperlick avatar richardwilkes 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

Watchers

 avatar  avatar  avatar  avatar

graphdot's Issues

unable to import source project even with a go.mod

$ head go.mod                                                            
module src/git/cassandra-k8s-operator

go 1.12

require (
	contrib.go.opencensus.io/exporter/ocagent v0.4.12 // indirect
	github.com/emicklei/go-restful v2.9.6+incompatible // indirect
	github.com/evanphx/json-patch v4.5.0+incompatible // indirect
	github.com/ewohltman/graphdot v0.1.1 // indirect
	github.com/ghodss/yaml v1.0.0

but the command fails

$ graphdot go.mod
Error: unable to import source project: no buildable Go source files in /home/cyril/src/git/cassandra-k8s-operator

Issues error when cgo is in use

Error determining dependency package: go/build: importGo C: exit status 1
can't load package: package C: unknown import path "C": internal error: module loader did not resolve import

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.