MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / formatSpaceForBasic

Function formatSpaceForBasic

pkg/cmd/space/view/view.go:119–139  ·  view source on GitHub ↗
(host string, space *spaces.Space)

Source from the content-addressed store, hash-verified

117}
118
119func formatSpaceForBasic(host string, space *spaces.Space) string {
120 var result strings.Builder
121
122 // header
123 result.WriteString(fmt.Sprintf("%s %s\n", output.Bold(space.Name), output.Dimf("(%s)", space.GetID())))
124
125 // metadata
126 if len(space.Description) == 0 {
127 result.WriteString(fmt.Sprintf("%s\n", output.Dim(constants.NoDescription)))
128 } else {
129 result.WriteString(fmt.Sprintf("%s\n", output.Dim(space.Description)))
130 }
131
132 // task processing
133 result.WriteString(fmt.Sprintf("Task Processing Status: %s\n", getTaskQueueStatusColored(space)))
134
135 // footer
136 result.WriteString(fmt.Sprintf("View this space in Octopus Deploy: %s", output.Blue(generateWebUrl(host, space))))
137
138 return result.String()
139}

Callers 1

viewRunFunction · 0.85

Calls 6

BoldFunction · 0.92
DimfFunction · 0.92
DimFunction · 0.92
BlueFunction · 0.92
generateWebUrlFunction · 0.85

Tested by

no test coverage detected