testCloser is a helper to fail the test if a Closer fails to close.
(t *testing.T, closer io.Closer)
| 247 | |
| 248 | // testCloser is a helper to fail the test if a Closer fails to close. |
| 249 | func testCloser(t *testing.T, closer io.Closer) { |
| 250 | t.Helper() |
| 251 | if err := closer.Close(); err != nil { |
| 252 | t.Errorf("Close failed: %s", err) |
| 253 | } |
| 254 | } |
no test coverage detected