-
Notifications
You must be signed in to change notification settings - Fork 18k
proposal: x/tools/cmd/callgraph: Add caller/callee definition locations to the edge output #65980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You can already print these fields by altering the value of the -format flag:
|
@adonovan Thank you for your prompt reply. (cmd/callgraph/main.go:9-20)
Here is an example of the proposed command line.
Are you suggesting that it is possible to output these in the current version? |
Fair enough: it is technically possible:
but it isn't very practical. I think adding a posn function to the template environment might be all that is needed:
|
Thank you for the detailed explanation. Following your suggestion, I have considered the following proposals: format flag:
code:
or format flag:
code:
|
Change https://go.dev/cl/567838 mentions this issue: |
Thanks @siroa, I've mailed a CL to add (and document) the |
Proposal Details
Example (cmd/callgraph/main.go)
The text was updated successfully, but these errors were encountered: