MCPcopy Index your code
hub / github.com/go-errors/errors / SourceLine

Method SourceLine

stackframe.go:65–71  ·  view source on GitHub ↗

SourceLine gets the line of code (from File and Line) of the original source if possible.

()

Source from the content-addressed store, hash-verified

63
64// SourceLine gets the line of code (from File and Line) of the original source if possible.
65func (frame *StackFrame) SourceLine() (string, error) {
66 source, err := frame.sourceLine()
67 if err != nil {
68 return source, New(err)
69 }
70 return source, err
71}
72
73func (frame *StackFrame) sourceLine() (string, error) {
74 if frame.LineNumber <= 0 {

Callers

nothing calls this directly

Calls 2

sourceLineMethod · 0.95
NewFunction · 0.85

Tested by

no test coverage detected