title: Creating call graph
body: <p>I am looking for a possibility to generate a call graph for Go projects. Something similar to <a href="http://www.doxygen.nl/manual/diagrams.html" rel="noreferrer">Doxygen's diagram functionality</a> for C++ classes (with the option CALL_GRAPH=YES).</p>
  
  <p>So far I found </p>
  
  <p><a href="http://saml.rilspace.org/profiling-and-creating-call-graphs-for-go-programs-with-go-tool-pprof" rel="noreferrer">http://saml.rilspace.org/profiling-and-creating-call-graphs-for-go-programs-with-go-tool-pprof</a>
  <br>or<br>
  <a href="http://blog.golang.org/profiling-go-programs" rel="noreferrer">http://blog.golang.org/profiling-go-programs</a></p>
  
  <p>This samples the call stack of your program 100 times per second while the program is running and creates a graph useful for profiling. If your program spends most of its time in functions not relevant to you, I found this solution not very usefull.</p>
  
  <p>Then there is this:</p>
  
  <p><a href="https://godoc.org/golang.org/x/tools/go/callgraph/static" rel="noreferrer">https://godoc.org/golang.org/x/tools/go/callgraph/static</a></p>
  
  <p>which from its description sounds like what I would need, but there seem to be no docs and I don't understand how to use it.</p>
  
  <p>I also found</p>
  
  <p><a href="https://github.com/davecheney/graphpkg/blob/master/README.md" rel="noreferrer">https://github.com/davecheney/graphpkg/blob/master/README.md</a>
  <br>and<br>
  <a href="https://github.com/paetzke/go-dep-graph/blob/master/README.org" rel="noreferrer">https://github.com/paetzke/go-dep-graph/blob/master/README.org</a></p>
  
  <p>but they create only dependency graphs.</p>