MCPcopy Index your code
hub / github.com/coder/coder / renderPortRow

Function renderPortRow

cli/cliui/resources.go:164–174  ·  view source on GitHub ↗
(port codersdk.WorkspaceAgentListeningPort, idx, total int)

Source from the content-addressed store, hash-verified

162}
163
164func renderPortRow(port codersdk.WorkspaceAgentListeningPort, idx, total int) table.Row {
165 var sb strings.Builder
166 _, _ = sb.WriteString(" ")
167 _, _ = sb.WriteString(renderPipe(idx, total))
168 _, _ = sb.WriteString("─ ")
169 _, _ = sb.WriteString(pretty.Sprintf(DefaultStyles.Code, "%5d/%s", port.Port, port.Network))
170 if port.ProcessName != "" {
171 _, _ = sb.WriteString(pretty.Sprintf(DefaultStyles.Keyword, " [%s]", port.ProcessName))
172 }
173 return table.Row{sb.String()}
174}
175
176func renderDevcontainers(resources []codersdk.WorkspaceResource, wro WorkspaceResourcesOptions, agentID uuid.UUID, index, totalAgents int) []table.Row {
177 var rows []table.Row

Callers 1

renderListeningPortsFunction · 0.85

Calls 3

renderPipeFunction · 0.85
WriteStringMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected