From a5fafedf3bce32d4a6f40839b8c34bfe22e9d7df Mon Sep 17 00:00:00 2001 From: HuKeping Date: Mon, 1 Dec 2014 16:28:08 +0800 Subject: [PATCH] inspect: format the output of docker inspect Prior to this patch, one would get the output of docker inspect xxx as below: user@server:/mnt$ docker inspect ubuntu [{ "Architecture": "amd64", ... "VirtualSize": 199257566 } ]user@server:/mnt$ The last ']' was on the same line with the prompt, i wonder if it is really what we want it be, it is a little weird, so i add a '\n' to it. Signed-off-by: Hu Keping Upstream-commit: 921346be48d20a66b2b5763144b064395285bb32 Component: engine --- components/engine/api/client/commands.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/api/client/commands.go b/components/engine/api/client/commands.go index 8cb1b2847f..a3dcffa736 100644 --- a/components/engine/api/client/commands.go +++ b/components/engine/api/client/commands.go @@ -882,7 +882,7 @@ func (cli *DockerCli) CmdInspect(args ...string) error { // Remove trailing ',' indented.Truncate(indented.Len() - 1) } - indented.WriteByte(']') + indented.WriteString("]\n") if tmpl == nil { if _, err := io.Copy(cli.out, indented); err != nil {