type StackFrame … // NewStackFrame popoulates a stack frame object from the program counter. func NewStackFrame(pc uintptr) (frame StackFrame) { … } // Func returns the function that contained this frame. func (frame *StackFrame) Func() *runtime.Func { … } // String returns the stackframe formatted in the same way as go does // in runtime/debug.Stack() func (frame *StackFrame) String() string { … } // SourceLine gets the line of code (from File and Line) of the original source if possible. func (frame *StackFrame) SourceLine() (string, error) { … } func (frame *StackFrame) sourceLine() (string, error) { … } func packageAndName(fn *runtime.Func) (string, string) { … }