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

Function GetFirstAppPackageGuid

integration/helpers/package.go:37–51  ·  view source on GitHub ↗
(appName string)

Source from the content-addressed store, hash-verified

35}
36
37func GetFirstAppPackageGuid(appName string) string {
38 commandName := "v3-packages"
39 if V7 {
40 commandName = "packages"
41 }
42 session := CF(commandName, appName)
43 Eventually(session).Should(Exit(0))
44
45 myRegexp, err := regexp.Compile(GUIDRegex)
46 Expect(err).NotTo(HaveOccurred())
47 matches := myRegexp.FindAll(session.Out.Contents(), -1)
48 packageGUID := matches[3]
49
50 return string(packageGUID)
51}
52
53func downloadFirstAppPackage(appName string, tmpZipFilepath string) {
54 appGUID := GetFirstAppPackageGuid(appName)

Callers 2

downloadFirstAppPackageFunction · 0.85

Calls 2

CFFunction · 0.85
FindAllMethod · 0.65

Tested by

no test coverage detected