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

Function readZipFile

pkg/cmd/run/view/logs_test.go:507–515  ·  view source on GitHub ↗
(t *testing.T, zf *zip.File)

Source from the content-addressed store, hash-verified

505}
506
507func readZipFile(t *testing.T, zf *zip.File) []byte {
508 rc, err := zf.Open()
509 assert.NoError(t, err)
510 defer rc.Close()
511
512 content, err := io.ReadAll(rc)
513 assert.NoError(t, err)
514 return content
515}
516
517func createZipReader(t *testing.T, files map[string]string) *zip.Reader {
518 raw := createZipArchive(t, files)

Callers 1

TestGetZipLogMapFunction · 0.85

Calls 2

OpenMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected