Closed ChrisHines closed 6 years ago
So, having submitted a PR for this, I can say it definitely does clean up a lot of the internal stack navigation logic but it seems to come with a decently heavy performance hit. Granted, stack generation is not really a thing that most applications are going to be doing at a high frequency but for things like logging frameworks, that may be a bit of a big deal.
There could also simply be inefficiencies in my code, so if anyone can give it a look over, perhaps that will shave off some time. The fact that this method performs far more allocations than the previous method is unavoidable, however.
Thanks for giving this a shot. I'll review your PR soon.
Closed by #19.
runtime.CallersFrames
was added in Go 1.7. Using it could clean up some of the internals of this package and eliminate the need for thefindSigpanic
function.