From 01a9a9284fd0082edead2ea6eaa01d152f7f4157 Mon Sep 17 00:00:00 2001 From: Qiang Huang Date: Wed, 3 Jun 2015 17:35:57 +0800 Subject: [PATCH] Add comment about inspect output Signed-off-by: Qiang Huang --- api/client/inspect.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/client/inspect.go b/api/client/inspect.go index eb8565b823..734d239759 100644 --- a/api/client/inspect.go +++ b/api/client/inspect.go @@ -109,6 +109,9 @@ func (cli *DockerCli) CmdInspect(args ...string) error { indented.WriteString("]\n") if tmpl == nil { + // Note that we will always write "[]" when "-f" isn't specified, + // to make sure the output would always be array, see + // https://github.com/docker/docker/pull/9500#issuecomment-65846734 if _, err := io.Copy(cli.out, indented); err != nil { return err }