()
| 25 | } |
| 26 | |
| 27 | func ExampleWaitGroup_WaitAndRecover() { |
| 28 | var wg WaitGroup |
| 29 | |
| 30 | wg.Go(func() { |
| 31 | panic("super bad thing") |
| 32 | }) |
| 33 | |
| 34 | recoveredPanic := wg.WaitAndRecover() |
| 35 | fmt.Println(recoveredPanic.Value) |
| 36 | // Output: |
| 37 | // super bad thing |
| 38 | } |
| 39 | |
| 40 | func TestWaitGroup(t *testing.T) { |
| 41 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…