« Back to Index

Go: Generate UML

View original Gist on GitHub

Tags: #go #uml #design #architecture #diagram

Generate UML from Go Project Code.bash

# install dependencies
brew install graphviz plantuml librsvg

# generate puml file for entire project
go run github.com/jfeliu007/goplantuml/cmd/goplantuml@latest -recursive ./ > Example.puml

# generate SVG from entire project
plantuml Example.puml -o "$pwd" -tsvg

# convert SVG into a PDF
rsvg-convert Example.svg -f pdf -o Example.pdf