MCPcopy
hub / github.com/uber-go/zap / FullPath

Method FullPath

zapcore/entry.go:85–96  ·  view source on GitHub ↗

FullPath returns a /full/path/to/package/file:line description of the caller.

()

Source from the content-addressed store, hash-verified

83// FullPath returns a /full/path/to/package/file:line description of the
84// caller.
85func (ec EntryCaller) FullPath() string {
86 if !ec.Defined {
87 return "undefined"
88 }
89 buf := bufferpool.Get()
90 buf.AppendString(ec.File)
91 buf.AppendByte(':')
92 buf.AppendInt(int64(ec.Line))
93 caller := buf.String()
94 buf.Free()
95 return caller
96}
97
98// TrimmedPath returns a package/file:line description of the caller,
99// preserving only the leaf directory name and file name.

Callers 3

StringMethod · 0.95
TrimmedPathMethod · 0.95
TestEntryCallerFunction · 0.80

Calls 6

AppendByteMethod · 0.80
AppendStringMethod · 0.65
AppendIntMethod · 0.65
GetMethod · 0.45
StringMethod · 0.45
FreeMethod · 0.45

Tested by 1

TestEntryCallerFunction · 0.64