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

Function NewEntryCaller

zapcore/entry.go:57–67  ·  view source on GitHub ↗

NewEntryCaller makes an EntryCaller from the return signature of runtime.Caller.

(pc uintptr, file string, line int, ok bool)

Source from the content-addressed store, hash-verified

55// NewEntryCaller makes an EntryCaller from the return signature of
56// runtime.Caller.
57func NewEntryCaller(pc uintptr, file string, line int, ok bool) EntryCaller {
58 if !ok {
59 return EntryCaller{}
60 }
61 return EntryCaller{
62 PC: pc,
63 File: file,
64 Line: line,
65 Defined: true,
66 }
67}
68
69// EntryCaller represents the caller of a logging function.
70type EntryCaller struct {

Callers 1

TestEntryCallerFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestEntryCallerFunction · 0.68