MCPcopy Index your code
hub / github.com/pkg/errors / line

Method line

stack.go:34–41  ·  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

32// line returns the line number of source code of the
33// function for this Frame's pc.
34func (f Frame) line() int {
35 fn := runtime.FuncForPC(f.pc())
36 if fn == nil {
37 return 0
38 }
39 _, line := fn.FileLine(f.pc())
40 return line
41}
42
43// name returns the name of this function, if known.
44func (f Frame) name() string {

Callers 2

FormatMethod · 0.95
MarshalTextMethod · 0.95

Calls 1

pcMethod · 0.95

Tested by

no test coverage detected