Wrap4 is used to [Wrap] the last error return when returning 4 values. This is useful when returning multiple returns from a function call directly: return Wrap4(fn()) Wrap4 is used by the CLI to avoid line number changes. go:noinline due to GetCaller (see [Wrap] for details).
(t1 T1, t2 T2, t3 T3, err error)
| 58 | // |
| 59 | //go:noinline due to GetCaller (see [Wrap] for details). |
| 60 | func Wrap4[T1, T2, T3 any](t1 T1, t2 T2, t3 T3, err error) (T1, T2, T3, error) { |
| 61 | if err == nil { |
| 62 | return t1, t2, t3, nil |
| 63 | } |
| 64 | |
| 65 | return t1, t2, t3, wrap(err, pc.GetCaller()) |
| 66 | } |
| 67 | |
| 68 | // Wrap5 is used to [Wrap] the last error return when returning 5 values. |
| 69 | // This is useful when returning multiple returns from a function call directly: |