MCPcopy
hub / github.com/duke-git/lancet / line

Method line

xerror/stack.go:91–98  ·  view source on GitHub ↗

line returns the line number of source code of the function for this Frame's pc.

()

Source from the content-addressed store, hash-verified

89// line returns the line number of source code of the
90// function for this Frame's pc.
91func (f frame) line() int {
92 fn := runtime.FuncForPC(f.pc())
93 if fn == nil {
94 return 0
95 }
96 _, line := fn.FileLine(f.pc())
97 return line
98}
99
100// name returns the name of this function, if known.
101func (f frame) name() string {

Callers 3

FormatMethod · 0.95
MarshalTextMethod · 0.95
StacksMethod · 0.80

Calls 1

pcMethod · 0.95

Tested by

no test coverage detected