MCPcopy
hub / github.com/expr-lang/expr / Errorf

Function Errorf

internal/spew/spew.go:32–34  ·  view source on GitHub ↗

Errorf is a wrapper for fmt.Errorf that treats each argument as if it were passed with a default Formatter interface returned by NewFormatter. It returns the formatted string as a value that satisfies error. See NewFormatter for formatting details. This function is shorthand for the following syn

(format string, a ...interface{})

Source from the content-addressed store, hash-verified

30//
31// fmt.Errorf(format, spew.NewFormatter(a), spew.NewFormatter(b))
32func Errorf(format string, a ...interface{}) (err error) {
33 return fmt.Errorf(format, convertArgs(a)...)
34}
35
36// Fprint is a wrapper for fmt.Fprint that treats each argument as if it were
37// passed with a default Formatter interface returned by NewFormatter. It

Callers 1

TestSpewFunction · 0.92

Calls 2

convertArgsFunction · 0.85
ErrorfMethod · 0.65

Tested by 1

TestSpewFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…