MCPcopy Create free account
hub / github.com/cloudfoundry/multiapps-cli-plugin / isInArchive

Function isInArchive

util/archive_builder_test.go:402–414  ·  view source on GitHub ↗
(fileName, archiveLocation string)

Source from the content-addressed store, hash-verified

400})
401
402func isInArchive(fileName, archiveLocation string) bool {
403 mtaArchiveReader, err := zip.OpenReader(archiveLocation)
404 if err != nil {
405 return false
406 }
407 defer mtaArchiveReader.Close()
408 for _, file := range mtaArchiveReader.File {
409 if file.Name == fileName {
410 return true
411 }
412 }
413 return false
414}
415
416func isManifestValid(manifestLocation string, searchCriteria map[string]string, archiveLocation string) map[string]string {
417 mtaArchiveReader, err := zip.OpenReader(archiveLocation)

Callers 1

Calls 1

CloseMethod · 0.45

Tested by

no test coverage detected