GoLand中使用PlantUML生成Go UML图,使用go-callvis生成Go 调用关系图

1.在goland IDE中安装plantuml插件

2.安装go-package-plantuml工具
go get --insecure gitee.com/jscode/go-package-plantuml.git

修改go-package-plantuml代码支持outputfile
if opts.OutputFile==""{
result.OutputToFile("/tmp/uml.txt")
}else{
result.OutputToFile(opts.OutputFile)
}
go build 生成go-package-plantuml可执行文件

3.在goland中settings-->tools-->external tools配置gotouml
/root/networkservicemesh/gobuild/gocode/src/gitee.com/jscode/go-package-plantuml/go-package-plantuml
--gopath $GOPATH$ --codedir $FileDir$ --outputfile $FileDir$.puml


4.安装go-callvis
go get -u github.com/TrueFurby/go-callvis
go build 生成go-callvis可执行文件

go-callvis测试:
./go-callvis -debug -nostd github.com/networkservicemesh/networkservicemesh/k8s/cmd/nsmd-k8s | dot -Tsvg -o mgr.svg、
./go-callvis -debug -nostd -group pkg,type --focus dataplane -limit github.com/networkservicemesh/networkservicemesh github.com/networkservicemesh/networkservicemesh/dataplane/vppagent/cmd1.在goland IDE中安装plantuml插件

2.安装go-package-plantuml工具
go get --insecure gitee.com/jscode/go-package-plantuml.git

修改go-package-plantuml代码支持outputfile
if opts.OutputFile==""{
result.OutputToFile("/tmp/uml.txt")
}else{
result.OutputToFile(opts.OutputFile)
}
go build 生成go-package-plantuml可执行文件

3.在goland中settings-->tools-->external tools配置gotouml
/root/networkservicemesh/gobuild/gocode/src/gitee.com/jscode/go-package-plantuml/go-package-plantuml
--gopath $GOPATH$ --codedir $FileDir$ --outputfile $FileDir$.puml


4.安装go-callvis
go get -u github.com/TrueFurby/go-callvis
go build 生成go-callvis可执行文件

go-callvis测试:
./go-callvis -debug -nostd github.com/networkservicemesh/networkservicemesh/k8s/cmd/nsmd-k8s | dot -Tsvg -o mgr.svg、
./go-callvis -debug -nostd -group pkg,type --focus dataplane -limit github.com/networkservicemesh/networkservicemesh github.com/networkservicemesh/networkservicemesh/dataplane/vppagent/cmd 

posted @   易先讯  阅读(722)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
历史上的今天:
2022-07-17 领域层:用户实体和值对象(2)--构造函数
2022-07-17 gin领域层:用户实体编写和值对象(初步)
点击右上角即可分享
微信分享提示