MCPcopy Create free account
hub / github.com/cli/cli / buildDisplayName

Function buildDisplayName

pkg/cmd/codespace/create.go:596–605  ·  view source on GitHub ↗

buildDisplayName returns display name to be used in the machine survey prompt. prebuildAvailability will be migrated to use enum values: "none", "ready", "in_progress" before Prebuild GA

(displayName string, prebuildAvailability string)

Source from the content-addressed store, hash-verified

594// buildDisplayName returns display name to be used in the machine survey prompt.
595// prebuildAvailability will be migrated to use enum values: "none", "ready", "in_progress" before Prebuild GA
596func buildDisplayName(displayName string, prebuildAvailability string) string {
597 switch prebuildAvailability {
598 case "ready":
599 return displayName + " (Prebuild ready)"
600 case "in_progress":
601 return displayName + " (Prebuild in progress)"
602 default:
603 return displayName
604 }
605}
606
607func stringInSlice(a string, slice []string) bool {
608 for _, b := range slice {

Callers 2

TestBuildDisplayNameFunction · 0.85
getMachineNameFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestBuildDisplayNameFunction · 0.68