MCPcopy Index your code
hub / github.com/docker/cli / Error

Method Error

cli/command/task/formatter.go:128–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126}
127
128func (c *taskContext) Error() string {
129 // Trim and quote the error message.
130 taskErr := c.task.Status.Err
131 if c.trunc {
132 taskErr = formatter.Ellipsis(taskErr, maxErrLength)
133 }
134 if len(taskErr) > 0 {
135 taskErr = fmt.Sprintf(`"%s"`, taskErr)
136 }
137 return taskErr
138}
139
140func (c *taskContext) Ports() string {
141 if len(c.task.Status.PortStatus.Ports) == 0 {

Callers 1

TestTaskContextWriteFunction · 0.45

Calls

no outgoing calls

Tested by 1

TestTaskContextWriteFunction · 0.36