MCPcopy Index your code
hub / github.com/pkg/errors / ExampleWrap_extended

Function ExampleWrap_extended

example_test.go:115–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113}
114
115func 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
145func ExampleWrapf() {
146 cause := errors.New("whoops")

Callers

nothing calls this directly

Calls 1

fnFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…