MCPcopy Index your code
hub / github.com/cli/cli / testCloser

Function testCloser

pkg/iostreams/iostreams_progress_indicator_test.go:249–254  ·  view source on GitHub ↗

testCloser is a helper to fail the test if a Closer fails to close.

(t *testing.T, closer io.Closer)

Source from the content-addressed store, hash-verified

247
248// testCloser is a helper to fail the test if a Closer fails to close.
249func 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}

Callers 1

newTestVirtualTerminalFunction · 0.70

Calls 3

HelperMethod · 0.65
CloseMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected