大型的工程项目,调用关系错综复杂,阅读起来费时费力,如果只是想大概的看下项目的调用关系,可以使用go的可视化调用工具进行查看。今天要介绍的是go-callvis工具包。


git地址:go-callvis

介绍

The purpose of this tool is to provide developers with a visual overview of a Go program using data from call graph and its relations with packages and types. This is especially useful in larger projects where the complexity of the code much higher or when you are just simply trying to understand code of somebody else.


安装

方法1:go get -u http://github.com/ofabry/go-callvis
方法2:
git clone https://github.com/ofabry/go-callvis.git
cd go-callvis && make install

使用

访问

http://localhost:7878/

示例如下图: