go-callvis是以图片的形式展示了go程序的调用关系,在看复杂项目时尤其有用。
借助它看祖传golang代码,头痛好多了,都有时间更新公号了。
安装
go get -u github.com/TrueFurby/go-callvis
# or
git clone https://github.com/TrueFurby/go-callvis.git
cd go-callvis && make install
运行依赖
•Go[2] 1.12+•Graphviz:http://www.graphviz.org/download/[3] Mac 可以直接 brew install graphviz
项目地址:https://github.com/TrueFurby/go-callvis[4]
使用命令
命令特别简单,只需要简单的输入:
go-callvis [OPTIONS] <main package>
这里 main package 是包含代码的main函数所在的包,比如项目 https://github.com/gusibi/oneplus/tree/maste