MCPcopy
hub / github.com/cloudfoundry/cli / readFileInZip

Function readFileInZip

cf/appfiles/zipper_test.go:87–96  ·  view source on GitHub ↗
(index int, reader *zip.Reader)

Source from the content-addressed store, hash-verified

85}
86
87func readFileInZip(index int, reader *zip.Reader) (string, string) {
88 buf := &bytes.Buffer{}
89 file := reader.File[index]
90 fReader, err := file.Open()
91 _, err = io.Copy(buf, fReader)
92
93 Expect(err).NotTo(HaveOccurred())
94
95 return file.Name, string(buf.Bytes())
96}
97
98var _ = Describe("Zipper", func() {
99 Describe("Zip", func() {

Callers 1

zipper_test.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected