FullPath returns a /full/path/to/package/file:line description of the caller.
()
| 83 | // FullPath returns a /full/path/to/package/file:line description of the |
| 84 | // caller. |
| 85 | func (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. |