From 921346be48d20a66b2b5763144b064395285bb32 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 --- api/client/commands.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/client/commands.go b/api/client/commands.go index 8cb1b2847..a3dcffa73 100644 --- a/api/client/commands.go +++ b/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 {