Only that when Go 1.12 dropped, our similar function stopped working and that reducing the skip seemed to do the trick.
The symptom was that our function would see an assembly file as the caller, which I interpreted to mean that we'd skipped too far. It only happened in goroutines with short stacks and I put it down to inlining.
Quite possible that the "fix" I made was mistaken, or that runtime.Callers has been updated/fixed since then.
Looking back, I see three changes in that "fix":
- Change to skip from 6 to 1 (and increase pcs buffer size accordingly).
- Reslice pcs to the valid portion, looks like we missed that before; possible this was the "real" fix?
- Change the list of file names that we skip.
We were already using CallersFrames before the fix.