GetCaller captures the program counter of a caller, primarily intended for error helpers so caller information captures the helper's caller. Callers of this function should be marked '//go:noinline' to avoid inlining, as GetCaller expects to skip the caller's stack frame. //go:noinline func Wrap
()
| 23 | // |
| 24 | //go:noinline |
| 25 | func GetCaller() Caller { |
| 26 | return Caller{pc.GetCallerSkip1()} |
| 27 | } |
| 28 | |
| 29 | // Wrap adds the program counter captured in Caller to the error, |
| 30 | // similar to [Wrap], but relying on previously captured caller inforamtion. |