You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
karngyan
changed the title
Use CallerFrames to find the filename instead of traversing program counter
bug: use CallerFrames to find the filename instead of traversing program counter
Jun 8, 2022
Regarding findFileName
Go runtime docs discourage traversing PC or FuncForPC on any returned PCs as they can't account for inlining or return program counter adjustment.
This sometimes returns the wrong file name.
Something like this would be a better alternative:
What do you think?
The text was updated successfully, but these errors were encountered: