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

Method String

agent/agentcontainers/containers_dockercli.go:379–394  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

377}
378
379func (dis dockerInspectState) String() string {
380 if dis.Running {
381 return "running"
382 }
383 var sb strings.Builder
384 _, _ = sb.WriteString("exited")
385 if dis.ExitCode != 0 {
386 _, _ = sb.WriteString(fmt.Sprintf(" with code %d", dis.ExitCode))
387 } else {
388 _, _ = sb.WriteString(" successfully")
389 }
390 if dis.Error != "" {
391 _, _ = sb.WriteString(fmt.Sprintf(": %s", dis.Error))
392 }
393 return sb.String()
394}
395
396func convertDockerInspect(raw []byte) ([]codersdk.WorkspaceAgentContainer, []string, error) {
397 var warns []string

Callers 15

TestIntegrationDockerFunction · 0.45
runFunction · 0.45
safeAgentNameFunction · 0.45
runFunction · 0.45
ListMethod · 0.45
convertDockerInspectFunction · 0.45
DeleteMethod · 0.45

Calls 1

WriteStringMethod · 0.80

Tested by 11

TestIntegrationDockerFunction · 0.36
runFunction · 0.36
DeleteMethod · 0.36
TestAPIFunction · 0.36
fakeContainerFunction · 0.36
TestFSNotifyWatcherFunction · 0.36
TestMiddlewareAccessLogFunction · 0.36
TestExtractContextFunction · 0.36