import ( "github.com/cloudfoundry-community/go-cfclient" "github.com/cloudfoundry-community/go-cf-spacefields" ) type MyApp struct { Name string `cf:"name"` GUID string `cf:"guid"` SpaceGUID string `cf:"space_guid"` ServiceInstances []cfclient.Service `cf:"service_instances"` } func main() { spaceFields := spacefields.New(cfClient) myApp := &MyApp{} err := spaceFields.FillStruct("myapp-guid", myApp) if err != nil { log.Fatalln(err) } fmt.Println(myApp.Name) // "my-app" fmt.Println(myApp.GUID) // "my-app-guid" fmt.Println(myApp.SpaceGUID) // "my-space-guid" fmt.Println(myApp.ServiceInstances) // ... List of service instances ... }In this example, we're using SpaceFields to fill a struct for a Cloud Foundry app. The `MyApp` struct defines fields for the app's name, GUID, space GUID, and service instances. By annotating the fields with `cf` tags, we're telling SpaceFields which Cloud Foundry attributes correspond to each field. The `FillStruct` method then populates the struct with values retrieved from Cloud Foundry using the provided GUID. Package library: github.com/cloudfoundry-community/go-cf-spacefields