()
| 26 | } |
| 27 | |
| 28 | func 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 | } |
nothing calls this directly
no test coverage detected