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

Method file

xerror/stack.go:80–87  ·  view source on GitHub ↗

file returns the full path to the file that contains the function for this Frame's pc.

()

Source from the content-addressed store, hash-verified

78// file returns the full path to the file that contains the
79// function for this Frame's pc.
80func (f frame) file() string {
81 fn := runtime.FuncForPC(f.pc())
82 if fn == nil {
83 return "unknown"
84 }
85 file, _ := fn.FileLine(f.pc())
86 return file
87}
88
89// line returns the line number of source code of the
90// function for this Frame's pc.

Callers 3

FormatMethod · 0.95
MarshalTextMethod · 0.95
StacksMethod · 0.80

Calls 1

pcMethod · 0.95

Tested by

no test coverage detected