Open
Description
I made a spiritual successor of github.com/pkg/errors
some time ago and in it I want to know if an error already contains a stack trace. The goal is that if a large codebase uses different packages for errors, they should work together and not hide existing recorded information, like a stack trace.
It seems this package does not expose the stack trace as []uintptr
but only as a formatted string?
I would suggest that the following interface is implemented:
type stackTracer interface {
StackTrace() []uintptr
}
Then, it is easy to obtain a stack trace, use it, format it. To me it looks like a simple type cast should be enough to do so?