• Stars
    star
    707
  • Rank 61,943 (Top 2 %)
  • Language
    Go
  • Created about 10 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

a visualization tool for golang project dependency

goviz

a visualization tool for golang project dependency

This tool is for helping source code reading. The dependency of the whole code can be visualized quickly.

Installation

go get github.com/hirokidaichi/goviz

and if not being installed graphviz, install it :

brew install graphviz

Usage

goviz -i github.com/hashicorp/serf | dot -Tpng -o hoge.png

Option

Usage:
  goviz [OPTIONS]

Application Options:
  -i, --input=   intput ploject name
  -o, --output=  output file (STDOUT)
  -d, --depth=   max plot depth of the dependency tree (128)
  -f, --focus=   focus on the specific module
  -s, --search=  top directory of searching
  -l, --leaf     whether leaf nodes are plotted (false)
  -m, --metrics  display module metrics (false)

Help Options:
  -h, --help     Show this help message

exit status 1

Samples

anko

goviz -i github.com/mattn/anko | dot -Tpng -o anko.png

serf

goviz -i github.com/hashicorp/serf | dot -Tpng -o serf.png

go-xslate

goviz -i github.com/lestrrat/go-xslate | dot -Tpng -o xslate.png

vegeta

goviz -i github.com/tsenart/vegeta -l| dot -Tpng -o vegeta.png

packer

goviz -i github.com/mitchellh/packer --search SELF| dot -Tpng -o packer.png

docker plot depth 1

goviz -i github.com/dotcloud/docker/docker -s github.com/dotcloud/docker -d 1| dot -Tpng -o docker1.png

docker plot depth 2

goviz -i github.com/dotcloud/docker/docker -s github.com/dotcloud/docker -d 2| dot -Tpng -o docker2.png

docker plot depth 3

goviz -i github.com/dotcloud/docker/docker -s github.com/dotcloud/docker -d 3| dot -Tpng -o docker3.png

docker's execdrivers

goviz -i github.com/dotcloud/docker/runtime/execdriver/execdrivers/ -s github.com/dotcloud/docker| dot -Tpng -o docker-execdrivers.png

docker's metrics

goviz has a function which outputs the metrics (instability) of go project.

goviz -i github.com/dotcloud/docker/docker -m 

Instability is a value of 0 to 1. It suggests that it is such an unstable module that this value is high. It becomes easy to distinguish whether it is a module nearer to application layer, and whether it is a module near a common library.

Inst:1.000 Ca(  0) Ce(  9)	github.com/dotcloud/docker/docker
Inst:0.960 Ca(  1) Ce( 24)	github.com/dotcloud/docker/pkg/libcontainer/nsinit
Inst:0.956 Ca(  2) Ce( 43)	github.com/dotcloud/docker/runtime
Inst:0.950 Ca(  1) Ce( 19)	github.com/dotcloud/docker/api/client
Inst:0.950 Ca(  1) Ce( 19)	github.com/dotcloud/docker/server
Inst:0.909 Ca(  1) Ce( 10)	github.com/dotcloud/docker/api/server
Inst:0.867 Ca(  2) Ce( 13)	github.com/dotcloud/docker/runtime/execdriver/native
Inst:0.857 Ca(  1) Ce(  6)	github.com/dotcloud/docker/runtime/graphdriver/devmapper
Inst:0.833 Ca(  1) Ce(  5)	github.com/dotcloud/docker/runtime/graphdriver/aufs
Inst:0.800 Ca(  1) Ce(  4)	github.com/dotcloud/docker/builtins
Inst:0.800 Ca(  2) Ce(  8)	github.com/dotcloud/docker/runtime/networkdriver/bridge
Inst:0.800 Ca(  1) Ce(  4)	github.com/dotcloud/docker/runtime/execdriver/execdrivers
Inst:0.778 Ca(  2) Ce(  7)	github.com/dotcloud/docker/pkg/libcontainer/network
Inst:0.750 Ca(  1) Ce(  3)	github.com/dotcloud/docker/sysinit
Inst:0.750 Ca(  3) Ce(  9)	github.com/dotcloud/docker/runtime/execdriver/lxc
Inst:0.750 Ca(  1) Ce(  3)	github.com/dotcloud/docker/runtime/execdriver/native/template
Inst:0.727 Ca(  3) Ce(  8)	github.com/dotcloud/docker/graph
Inst:0.667 Ca(  1) Ce(  2)	github.com/dotcloud/docker/runtime/execdriver/native/configuration
Inst:0.667 Ca(  1) Ce(  2)	github.com/dotcloud/docker/runtime/networkdriver/portmapper
Inst:0.667 Ca(  1) Ce(  2)	github.com/dotcloud/docker/runtime/networkdriver/ipallocator
Inst:0.667 Ca(  1) Ce(  2)	github.com/dotcloud/docker/links
Inst:0.571 Ca(  9) Ce( 12)	github.com/dotcloud/docker/runconfig
Inst:0.500 Ca(  2) Ce(  2)	github.com/dotcloud/docker/pkg/selinux
Inst:0.500 Ca(  5) Ce(  5)	github.com/dotcloud/docker/api
Inst:0.500 Ca(  2) Ce(  2)	github.com/dotcloud/docker/daemonconfig
Inst:0.500 Ca(  5) Ce(  5)	github.com/dotcloud/docker/image
Inst:0.500 Ca(  1) Ce(  1)	github.com/dotcloud/docker/pkg/libcontainer/capabilities
Inst:0.500 Ca(  1) Ce(  1)	github.com/gorilla/mux
Inst:0.500 Ca(  1) Ce(  1)	github.com/dotcloud/docker/runtime/graphdriver/btrfs
Inst:0.500 Ca(  1) Ce(  1)	github.com/dotcloud/docker/runtime/graphdriver/vfs
Inst:0.444 Ca( 10) Ce(  8)	github.com/dotcloud/docker/archive
Inst:0.333 Ca(  2) Ce(  1)	github.com/dotcloud/docker/opts
Inst:0.333 Ca(  2) Ce(  1)	github.com/dotcloud/docker/runtime/networkdriver/portallocator
Inst:0.250 Ca(  6) Ce(  2)	github.com/dotcloud/docker/registry
Inst:0.250 Ca(  6) Ce(  2)	github.com/dotcloud/docker/pkg/cgroups
Inst:0.250 Ca(  3) Ce(  1)	github.com/dotcloud/docker/pkg/sysinfo
Inst:0.250 Ca(  3) Ce(  1)	github.com/dotcloud/docker/runtime/networkdriver
Inst:0.154 Ca( 11) Ce(  2)	github.com/dotcloud/docker/runtime/graphdriver
Inst:0.125 Ca(  7) Ce(  1)	github.com/dotcloud/docker/pkg/label
Inst:0.091 Ca( 10) Ce(  1)	github.com/dotcloud/docker/nat
Inst:0.083 Ca( 11) Ce(  1)	github.com/dotcloud/docker/runtime/execdriver
Inst:0.077 Ca( 36) Ce(  3)	github.com/dotcloud/docker/utils
Inst:0.067 Ca( 14) Ce(  1)	github.com/dotcloud/docker/engine
Inst:0.056 Ca( 17) Ce(  1)	github.com/dotcloud/docker/pkg/libcontainer
Inst:0.000 Ca(  2) Ce(  0)	github.com/dotcloud/docker/pkg/collections
Inst:0.000 Ca(  1) Ce(  0)	github.com/gorilla/context
Inst:0.000 Ca(  1) Ce(  0)	code.google.com/p/go.net/websocket
Inst:0.000 Ca(  7) Ce(  0)	github.com/dotcloud/docker/dockerversion
Inst:0.000 Ca(  3) Ce(  0)	github.com/dotcloud/docker/pkg/mflag
Inst:0.000 Ca(  4) Ce(  0)	github.com/dotcloud/docker/pkg/mount
Inst:0.000 Ca(  1) Ce(  0)	github.com/dotcloud/docker/pkg/namesgenerator
Inst:0.000 Ca(  4) Ce(  0)	github.com/dotcloud/docker/pkg/netlink
Inst:0.000 Ca(  1) Ce(  0)	github.com/dotcloud/docker/pkg/proxy
Inst:0.000 Ca(  1) Ce(  0)	github.com/dotcloud/docker/pkg/listenbuffer
Inst:0.000 Ca(  2) Ce(  0)	github.com/dotcloud/docker/pkg/signal
Inst:0.000 Ca( 10) Ce(  0)	github.com/dotcloud/docker/pkg/system
Inst:0.000 Ca(  2) Ce(  0)	github.com/dotcloud/docker/pkg/systemd
Inst:0.000 Ca(  6) Ce(  0)	github.com/dotcloud/docker/pkg/term
Inst:0.000 Ca(  3) Ce(  0)	github.com/dotcloud/docker/pkg/user
Inst:0.000 Ca(  2) Ce(  0)	github.com/dotcloud/docker/pkg/version
Inst:0.000 Ca(  2) Ce(  0)	github.com/dotcloud/docker/pkg/libcontainer/utils
Inst:0.000 Ca(  4) Ce(  0)	github.com/dotcloud/docker/pkg/libcontainer/apparmor
Inst:0.000 Ca(  2) Ce(  0)	github.com/dotcloud/docker/pkg/iptables
Inst:0.000 Ca(  2) Ce(  0)	github.com/dotcloud/docker/pkg/graphdb
Inst:0.000 Ca(  5) Ce(  0)	github.com/dotcloud/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar

License

MIT

Author

hirokidaichi [at] gmail.com

More Repositories

1

guiflow

a text editor for ui flow
JavaScript
747
star
2

uiflow

uiflow - the simplest way to write down your ui-flow diagram like markdown
JavaScript
412
star
3

gilot

a tool to analyze and visualize git logs.
Python
184
star
4

wanna

Shell command launcher with natural language
Python
143
star
5

brook

javascript-large-development-framework
JavaScript
47
star
6

namespace-js

javascript simple namespace module
JavaScript
43
star
7

application-security-2014

text of application security
19
star
8

cogito

a functional AI agent framework "cogito"
TypeScript
10
star
9

watch-then

do something when a file modified
JavaScript
9
star
10

flumine

a reactive utility for javascript promise
JavaScript
8
star
11

schemabuilder

a simple sql schema builder for golang
Go
7
star
12

git-aico

TypeScript
7
star
13

html-template

JavaScript
6
star
14

resizing-worker

an implementation of jpeg resize for s3 and sqs user
Go
5
star
15

p5-Data-Destructuring-Assignment

harmony's destructuring assignment for perl5
3
star
16

p5-Data-Visitor-Lite

2
star
17

spack

golang static server code generator
Go
2
star
18

drook

mvc-skelton-in-perl
2
star
19

p5-Class-DSLMaker

p5-Class-DSLMaker
1
star
20

lamb

a simple deploy and test tools for aws lambda
1
star
21

s3-config

a node config module for amazon S3 file
JavaScript
1
star
22

blog-sample

some sample codes in my blog
JavaScript
1
star
23

p5-Class-InnerClass

an easiest way to create inner class for perl5
1
star
24

js-ruby-mro

an implementation of ruby's method resolution order in javascript
1
star
25

ject

a simple text based project management tool
1
star
26

p5-Data-Enumerator

data generator
Perl
1
star
27

diffie

A commit message generator from Diff
1
star