NewEntryCaller makes an EntryCaller from the return signature of runtime.Caller.
(pc uintptr, file string, line int, ok bool)
| 55 | // NewEntryCaller makes an EntryCaller from the return signature of |
| 56 | // runtime.Caller. |
| 57 | func 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. |
| 70 | type EntryCaller struct { |
no outgoing calls