()
| 113 | } |
| 114 | |
| 115 | func ExampleWrap_extended() { |
| 116 | err := fn() |
| 117 | fmt.Printf("%+v\n", err) |
| 118 | |
| 119 | // Example output: |
| 120 | // error |
| 121 | // github.com/pkg/errors_test.fn |
| 122 | // /home/dfc/src/github.com/pkg/errors/example_test.go:47 |
| 123 | // github.com/pkg/errors_test.ExampleCause_printf |
| 124 | // /home/dfc/src/github.com/pkg/errors/example_test.go:63 |
| 125 | // testing.runExample |
| 126 | // /home/dfc/go/src/testing/example.go:114 |
| 127 | // testing.RunExamples |
| 128 | // /home/dfc/go/src/testing/example.go:38 |
| 129 | // testing.(*M).Run |
| 130 | // /home/dfc/go/src/testing/testing.go:744 |
| 131 | // main.main |
| 132 | // /github.com/pkg/errors/_test/_testmain.go:104 |
| 133 | // runtime.main |
| 134 | // /home/dfc/go/src/runtime/proc.go:183 |
| 135 | // runtime.goexit |
| 136 | // /home/dfc/go/src/runtime/asm_amd64.s:2059 |
| 137 | // github.com/pkg/errors_test.fn |
| 138 | // /home/dfc/src/github.com/pkg/errors/example_test.go:48: inner |
| 139 | // github.com/pkg/errors_test.fn |
| 140 | // /home/dfc/src/github.com/pkg/errors/example_test.go:49: middle |
| 141 | // github.com/pkg/errors_test.fn |
| 142 | // /home/dfc/src/github.com/pkg/errors/example_test.go:50: outer |
| 143 | } |
| 144 | |
| 145 | func ExampleWrapf() { |
| 146 | cause := errors.New("whoops") |
nothing calls this directly
no test coverage detected
searching dependent graphs…