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

Function FormatString

errtrace.go:99–103  ·  view source on GitHub ↗

FormatString writes the return trace for err to a string. Any error that has a method `TracePC() uintptr` will contribute to the trace. See [Format] for details of the output format.

(target error)

Source from the content-addressed store, hash-verified

97// contribute to the trace.
98// See [Format] for details of the output format.
99func FormatString(target error) string {
100 var s strings.Builder
101 _ = Format(&s, target)
102 return s.String()
103}
104
105type errTrace struct {
106 err error

Callers 9

TestFormatTraceFunction · 0.92
Example_getCallerFunction · 0.92
Example_treeFunction · 0.92
Example_traceFunction · 0.92
TestWrap_LineFunction · 0.92
Example_httpFunction · 0.92
BenchmarkErrtraceFunction · 0.92
TestClean_RealTraceFunction · 0.92
LogValueMethod · 0.85

Calls 2

FormatFunction · 0.85
StringMethod · 0.65

Tested by 8

TestFormatTraceFunction · 0.74
Example_getCallerFunction · 0.74
Example_treeFunction · 0.74
Example_traceFunction · 0.74
TestWrap_LineFunction · 0.74
Example_httpFunction · 0.74
BenchmarkErrtraceFunction · 0.74
TestClean_RealTraceFunction · 0.74