mirror of https://github.com/docker/cli.git
cli/command/formatter: define const for error column-headers
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
8b1cbfd769
commit
30a0d0c6d6
|
@ -16,6 +16,7 @@ const (
|
||||||
StatusHeader = "STATUS"
|
StatusHeader = "STATUS"
|
||||||
PortsHeader = "PORTS"
|
PortsHeader = "PORTS"
|
||||||
ImageHeader = "IMAGE"
|
ImageHeader = "IMAGE"
|
||||||
|
ErrorHeader = "ERROR"
|
||||||
ContainerIDHeader = "CONTAINER ID"
|
ContainerIDHeader = "CONTAINER ID"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@ const (
|
||||||
taskIDHeader = "ID"
|
taskIDHeader = "ID"
|
||||||
desiredStateHeader = "DESIRED STATE"
|
desiredStateHeader = "DESIRED STATE"
|
||||||
currentStateHeader = "CURRENT STATE"
|
currentStateHeader = "CURRENT STATE"
|
||||||
errorHeader = "ERROR"
|
|
||||||
|
|
||||||
maxErrLength = 30
|
maxErrLength = 30
|
||||||
)
|
)
|
||||||
|
@ -61,7 +60,7 @@ func FormatWrite(ctx formatter.Context, tasks []swarm.Task, names map[string]str
|
||||||
"Node": nodeHeader,
|
"Node": nodeHeader,
|
||||||
"DesiredState": desiredStateHeader,
|
"DesiredState": desiredStateHeader,
|
||||||
"CurrentState": currentStateHeader,
|
"CurrentState": currentStateHeader,
|
||||||
"Error": errorHeader,
|
"Error": formatter.ErrorHeader,
|
||||||
"Ports": formatter.PortsHeader,
|
"Ports": formatter.PortsHeader,
|
||||||
}
|
}
|
||||||
return ctx.Write(&taskCtx, render)
|
return ctx.Write(&taskCtx, render)
|
||||||
|
|
Loading…
Reference in New Issue