ondrajz / go-callvis

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

Include concrete usage example in README? #19

Closed samuell closed 6 years ago

samuell commented 6 years ago

Hi,

I'm a bit confused as how to use go-callvis. What do I put where it says <main pkg> in the usage example?

I have tried the following, with the results you can see:

$ go-callvis github.com/scipipe/scipipe | dot -Tpng -o output.png
go-callvis: cannot find package "main" in any of:
        /home/samuel/go/src/main (from $GOROOT)
        /home/samuel/proj/go/src/main (from $GOPATH)

... and:

$ go-callvis github.com/scipipe/scipipe/main | dot -Tpng -o output.png
cannot find package "github.com/scipipe/scipipe/main" in any of:
        /home/samuel/go/src/github.com/scipipe/scipipe/main (from $GOROOT)
        /home/samuel/proj/go/src/github.com/scipipe/scipipe/main (from $GOPATH)
go-callvis: no initial packages were loaded
ondrajz commented 6 years ago

It works on programs only. Use github.com/scipipe/scipipe/cmd/scipipe.

samuell commented 6 years ago

@TrueFurby Ah, IC, thanks!