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

Function Example_getCaller

example_errhelper_test.go:28–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26}
27
28func Example_getCaller() {
29 got := errtrace.FormatString(f1Wrap())
30
31 // make trace agnostic to environment-specific location
32 // and less sensitive to line number changes.
33 fmt.Println(tracetest.MustClean(got))
34
35 // Output:
36 //failed [foo] [method=order] [u=1]
37 //
38 //braces.dev/errtrace_test.f3Wrap
39 // /path/to/errtrace/example_errhelper_test.go:3
40 //braces.dev/errtrace_test.f2Wrap
41 // /path/to/errtrace/example_errhelper_test.go:2
42 //braces.dev/errtrace_test.f1Wrap
43 // /path/to/errtrace/example_errhelper_test.go:1
44}

Callers

nothing calls this directly

Calls 3

FormatStringFunction · 0.92
MustCleanFunction · 0.92
f1WrapFunction · 0.85

Tested by

no test coverage detected