ondrajz / go-callvis

Visualize call graph of a Go program using Graphviz
https://ofabry.github.io/go-callvis
MIT License
5.85k stars 406 forks source link

Add options -format,-file for PNG/SVG file output #39

Closed Russtopia closed 5 years ago

Russtopia commented 5 years ago

Addition of -output, -svg, -png options to run go-callvis in a non-server mode to just output image files. Useful for scripting eg., makefile targets to generate graphvis for modules non-interactively.

Russtopia commented 5 years ago

Intended to address issue https://github.com/TrueFurby/go-callvis/issues/36

ondrajz commented 5 years ago

Thank you for your contribution. Please fix the PR as mentioned in comments.

ondrajz commented 5 years ago

@Russtopia It would be really great if you could also update few examples that show command usage with parameters, because they don't currently show something that would work with latest version.

Russtopia commented 5 years ago

@Russtopia It would be really great if you could also update few examples that show command usage with parameters, because they don't currently show something that would work with latest version.

Sure, I should have done that with the original patch.

Russtopia commented 5 years ago

@Russtopia It would be really great if you could also update few examples that show command usage with parameters, because they don't currently show something that would work with latest version.

Newest PR updates examples, but I had to guess at the last example -- I'm unfamiliar with 'exo-open' but from the context it appears to take the SVG output and convert to JPG?

Russtopia commented 5 years ago

New version pushed. Implements the changes suggested: