-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
runtime: Frames example does not produce documented output #70057
Comments
Related Issues and Documentation
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
The issue here is that the formatting done to turn the code into an example changes its behavior: when run as a test, the stack includes these functions:
but when the documentation Example is run as shown, the stack instead has these functions:
Doing a replace-all from "main.main" to "runtime_test.ExampleFrames" before printing each line of output, and breaking after "main.main" is seen, should fix it. |
Fixes golang#70057 Change-Id: I286822f844fcb95fa8b55bfc30fe472d0ba11de0
Change https://go.dev/cl/625904 mentions this issue: |
Fixes golang#70057 Change-Id: I286822f844fcb95fa8b55bfc30fe472d0ba11de0
Fixes golang#70057 Change-Id: I286822f844fcb95fa8b55bfc30fe472d0ba11de0
Fixes golang#70057 Change-Id: I286822f844fcb95fa8b55bfc30fe472d0ba11de0
Go version
go version go1.23.2 linux/amd64
Output of
go env
in your module/workspace:What did you do?
Run the example at https://pkg.go.dev/runtime#example-Frames
What did you see happen?
It outputs only
- more:true | runtime.Callers
Commenting out the check that
frame.File
contains"runtime/"
shows the missing frames and more.What did you expect to see?
The same output that the example shows before it is run:
The text was updated successfully, but these errors were encountered: