1 - go callvis概述
go callvis工具概述
介绍
go-callvis 以图片的形式展示了go程序的调用关系,这个工具在看复杂项目时尤其有用。
参考资料
相关文章
2 - 安装gdb
Golang gdb 工具的安装
准备
参考 https://github.com/ofabry/go-callvis 的要求,需要先准备:
- go 1.12+
- Graphviz
因此需要先安装 graphviz,否则运行时会报错找不到"dot"。
- mac下:直接运行
brew install graphviz
安装
运行命令,注意GOPATH 要正确设置好:
go get -u github.com/ofabry/go-callvis
验证
参考官方例子:https://github.com/ofabry/go-callvis/tree/master/examples