Go-Callvis Viewer

Home|gocallvis/examples/README.md
1# Examples
2
3This document contains examples of various projects from Github.
4
5#### Projects
6  - [Syncthing](https://github.com/syncthing/syncthing)
7  - [Docker](https://github.com/docker/docker)
8  - [Travis CI Worker](https://github.com/travis-ci/worker)
9
10
11## Syncthing
12
13[![syncthing example](../images/syncthing.png)](https://raw.githubusercontent.com/ofabry/go-callvis/master/images/syncthing.png)
14
15```sh
16go get -u github.com/syncthing/syncthing/
17cd $GOPATH/src/github.com/syncthing/syncthing
18
19# Syncthing needs a special build process, so don't forget to call build.sh
20./build.sh
21```
22
23# Generate graph and launch webserver
24```sh
25go-callvis -focus upgrade -group pkg,type -limit github.com/syncthing/syncthing -ignore github.com/syncthing/syncthing/lib/logger github.com/syncthing/syncthing/cmd/syncthing
26```
27
28---
29
30### Focusing package _upgrade_
31
32[![syncthing example output](../images/syncthing_focus.png)](https://raw.githubusercontent.com/ofabry/go-callvis/master/images/syncthing_focus.png)
33
34```sh
35go-callvis -format=png -file=syncthing_focus -focus upgrade -limit github.com/syncthing/syncthing github.com/syncthing/syncthing/cmd/syncthing
36```
37---
38
39### Grouping by _packages_
40
41[![syncthing example output pkg](../images/syncthing_group.png)](https://raw.githubusercontent.com/ofabry/go-callvis/master/images/syncthing_group.png)
42
43# Generate graph focused on module 'upgrade', output to PNG file
44```sh
45go-callvis -format=png -file=syncthing_group -focus upgrade -group pkg -limit github.com/syncthing/syncthing github.com/syncthing/syncthing/cmd/syncthing
46```
47---
48
49### Ignoring package _logger_
50
51[![syncthing example output ignore](../images/syncthing_ignore.png)](https://raw.githubusercontent.com/ofabry/go-callvis/master/images/syncthing_ignore.png)
52
53# Generate graph focused on module 'upgrade' and ignoring 'logger', output to webserver
54```sh
55go-callvis -focus upgrade -group pkg -ignore github.com/syncthing/syncthing/lib/logger -limit github.com/syncthing/syncthing github.com/syncthing/syncthing/cmd/syncthing
56```
57---
58
59## Docker
60
61[![docker example](../images/docker.png)](https://raw.githubusercontent.com/ofabry/go-callvis/master/images/docker.png)
62
63```sh
64go-callvis -format=png -file=docker -limit github.com/docker/docker -ignore github.com/docker/docker/vendor github.com/docker/docker/cmd/docker | dot -Tpng -o docker.png
65```
66---
67
68## Travis CI Worker
69
70[![travis-example](../images/travis_thumb.jpg)](https://raw.githubusercontent.com/ofabry/go-callvis/master/images/travis.jpg)
71
72```sh
73go-callvis -format=svg -file=travis -minlen 3 -nostd -group type,pkg -focus worker -limit github.com/travis-ci/worker -ignore github.com/travis-ci/worker/vendor github.com/travis-ci/worker/cmd/travis-worker && exo-open travis.svg
74```
75
MembersX
Members
X