Goland uses GoPlantUML to generate class diagrams

① Install the goplantuml executable file

go get github.com/jfeliu007/goplantuml/parser
go install github.com/jfeliu007/goplantuml/cmd/goplantuml@latest
Generate .exe executable file in the bin directory of $GOPATH:
insert image description here

② Golang adds goplantuml

In Goland: File --> Settings --> Tools --> External Tools
Name is to name the tool, Program is the path to the executable file, and Arguments is to set certain parameters.
insert image description here

③ Goland installs the PlantUML plug-in

insert image description here

④ Test

Select the service directory, right-click External Tools and select goplantuml to generate a puml file.
insert image description here
Generated successfully:insert image description here

Guess you like

Origin blog.csdn.net/weixin_46878177/article/details/130059118