Errorf creates an error message according to a format specifier and returns the string as a value that satisfies error. It's equivalent to [fmt.Errorf] followed by [Wrap] to add caller information. go:noinline due to GetCaller (see [Wrap] for details).
(format string, args ...any)
| 24 | // |
| 25 | //go:noinline due to GetCaller (see [Wrap] for details). |
| 26 | func Errorf(format string, args ...any) error { |
| 27 | return wrap(fmt.Errorf(format, args...), pc.GetCaller()) |
| 28 | } |