command module
Version: v0.3.1 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2017 License: MIT Imports: 16 Imported by: 0


go-callvis GitHub release Build Status Slack

go-callvis is a development tool to help visualize call graph of your Go program using Graphviz's dot format.


Intended purpose of this tool is to provide a visual overview of your program's source code structure by using call graph and type relations. This is especially useful in larger projects where the complexity of the code rises.


  • focus specific package in a program
  • group funcs by packages and/or types
  • limit packages to custom prefix path
  • ignore packages containing custom prefix
How it works

It runs pointer analysis to construct the call graph of the program and uses the data to generate output in dot format, which can be rendered with Graphviz tools.



Use the following commands to install:

go get -u github.com/TrueFurby/go-callvis
cd $GOPATH/src/github.com/TrueFurby/go-callvis
go-callvis [OPTIONS] <main pkg>

  -focus string
        Focus package with name (default: main).
  -limit string
        Limit package path to prefix.
  -group string
        Grouping by [type, pkg] (separated by comma).
  -ignore string
        Ignore package paths with prefix (separated by comma).
        Include test code.
        Enable verbose log.
        Show version and exit.


Packages & Types

Presented as subgraphs (clusters).

  • packages have normal corners and label on the top
  • types have rounded corners with label on the bottom
Represents Style
focused blue color
stdlib green color :collision: NEW!
other yellow color

Presented as nodes.

Represents Style
exported bold border
unexported normal border
anonymous dotted border

Presented as edges.

Represents Style
internal black color
external brown color
static solid line
dynamic dashed line
regular simple arrow
concurrent empty arrow arrow with empty circle ⚠️
deferred empty circle arrow with empty diamond ⚠️


Here is example for project syncthing.

syncthing example

go-callvis -focus upgrade -group pkg,type -limit github.com/syncthing/syncthing -ignore github.com/syncthing/syncthing/lib/logger github.com/syncthing/syncthing/cmd/syncthing | dot -Tpng -o syncthing.png

You can find more examples in the folder examples.


Ideal goal of this project is to make web app that would locally store the call graph data and then provide quick access of the call graphs for any package of your dependency tree. At first it would show an interactive map of overall dependencies between packages and then by selecting particular package it would show the call graph and provide various options to alter the output dynamically.

Known Issues

execution takes a lot of time, because currently:

  • the call graph is always generated for the entire program
  • there is yet no caching of call graph data


Join the #go-callvis channel at gophers.slack.com



go-callvis: a tool to help visualize the call graph of a Go program.


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL