entviz is an ent extension that creates visual graph (html file) of your ent's schema.
go get github.com/hedwigz/entviz
add this extension to ent (see example code) run
go generate ./ent
your html will be saved at ent/schema-viz.html
You can use the helper function ent.ServeEntviz
to easily serve the static html page over http
http.ListenAndServe("localhost:3002", ent.ServeEntviz())
Install the cmd
go get github.com/hedwigz/entviz/cmd/entviz
Then run inside your project:
entviz ./etc/schema