go-callvis
go-callvis copied to clipboard
init() of blanked imports are ignored
Hi, I have a project that contains multiple imported packages, some of them are blanked because I'm using only the init() function, the problem is that in go-callvis they are not displayed. I use
go-callvis -group type,pkg ../myproject |dot -Tpng -o out.png
I'm missing something?
Hey, there is a -focus flag which by default uses main package to focus only on calls going from or to that package. That's why you don't see those init() functions from other packages.
You could try focusing on the package that has the init() you are interested it. However you could also checkout the recent enhancement for go-callvis, currently opened in PR.
The call graph output is now served via HTTP server in SVG format and you can click on packages to change focus.