go-callvis icon indicating copy to clipboard operation
go-callvis copied to clipboard

init() of blanked imports are ignored

Open Nhoya opened this issue 7 years ago • 1 comments

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?

Nhoya avatar May 18 '18 11:05 Nhoya

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.

ondrajz avatar Jul 21 '18 21:07 ondrajz