import "github.com/cloudfoundry/cli/cf/models" appGuid := "12345678-abcd-efgh-ijkl-9876543210ed" app := models.Application{ GUID: appGuid, }
import "github.com/cloudfoundry/cli/cf/api/applications" appGuid := "12345678-abcd-efgh-ijkl-9876543210ed" appAPI := applications.NewCloudControllerApplicationRepository() app, err := appAPI.GetApp(appGuid) if err != nil { // handle error }In both examples, the Application object is represented by a GUID. The first example creates a new Application object with the specified GUID. The second example retrieves an Application object from the Cloud Foundry API using the specified GUID.