MCPcopy Index your code
hub / github.com/bracesdev/errtrace / Errorf

Function Errorf

errors.go:26–28  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

24//
25//go:noinline due to GetCaller (see [Wrap] for details).
26func Errorf(format string, args ...any) error {
27 return wrap(fmt.Errorf(format, args...), pc.GetCaller())
28}

Callers 4

TestFormatFunction · 0.92
TestWrap_LineFunction · 0.92
f2Function · 0.92
SkipErrorfFunction · 0.92

Calls 2

GetCallerFunction · 0.92
wrapFunction · 0.70

Tested by 3

TestFormatFunction · 0.74
TestWrap_LineFunction · 0.74
f2Function · 0.74