Goland生成类图
1.安装goplantuml
# 找到生成成二进制目录,$GOBIN
go get github.com/jfeliu007/goplantuml/cmd/goplantuml
-
将goplantuml集成到Goland
打开
settings/Tools/External Tools
,添加goplantuml ,Arags:-recursive --output=$FileDir$.puml $FileDir$
-
Goland安装plantuml插件
File --> Setting --> Plugins --> plantuml (安装)
-
安装Graphviz
# ubuntu直接安装,windows手动安装 apt-get install graphviz 下载地址:https://graphviz.org/download/
-
测试,在需要生成类图的文件夹,右键 External Tools --> goplantuml,会生成xx.puml文件,就会渲染出效果。