MCPcopy Index your code
hub / github.com/cockroachdb/errors / Formattable

Function Formattable

errbase/format_error.go:73–75  ·  view source on GitHub ↗

Formattable wraps an error into a fmt.Formatter which will provide "smart" formatting even if the outer layer of the error does not implement the Formatter interface.

(err error)

Source from the content-addressed store, hash-verified

71// will provide "smart" formatting even if the outer layer
72// of the error does not implement the Formatter interface.
73func Formattable(err error) fmt.Formatter {
74 return &errorFormatter{err}
75}
76
77// formatErrorInternal is the shared logic between FormatError
78// and FormatErrorRedactable.

Callers 6

FormattableFunction · 0.92
TestFormatFunction · 0.92
TestSimplifyStacksFunction · 0.92
TestFormatViaRedactFunction · 0.92
TestDatadrivenFunction · 0.92
TestFormatErrorInternalFunction · 0.70

Calls

no outgoing calls

Tested by 5

TestFormatFunction · 0.74
TestSimplifyStacksFunction · 0.74
TestFormatViaRedactFunction · 0.74
TestDatadrivenFunction · 0.74
TestFormatErrorInternalFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…