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"
PortsHeader = "PORTS"
ImageHeader = "IMAGE"
ErrorHeader = "ERROR"
ContainerIDHeader = "CONTAINER ID"
)

View File

@ -20,7 +20,6 @@ const (
taskIDHeader = "ID"
desiredStateHeader = "DESIRED STATE"
currentStateHeader = "CURRENT STATE"
errorHeader = "ERROR"
maxErrLength = 30
)
@ -61,7 +60,7 @@ func FormatWrite(ctx formatter.Context, tasks []swarm.Task, names map[string]str
"Node": nodeHeader,
"DesiredState": desiredStateHeader,
"CurrentState": currentStateHeader,
"Error": errorHeader,
"Error": formatter.ErrorHeader,
"Ports": formatter.PortsHeader,
}
return ctx.Write(&taskCtx, render)