cli/command/formatter: define const for error column-headers

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-11-28 16:27:45 +01:00
parent 8b1cbfd769
commit 30a0d0c6d6
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
2 changed files with 2 additions and 2 deletions

View File

@ -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"
) )

View File

@ -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)