From babd5720157898bb33d806bda920d9f9f2df73f0 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Wed, 26 Mar 2014 15:14:26 -0400 Subject: [PATCH] filters: cleanup & fmt Docker-DCO-1.1-Signed-off-by: Vincent Batts (github: vbatts) --- api/client/commands.go | 16 ---------------- utils/filters/parse.go | 6 +++--- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/api/client/commands.go b/api/client/commands.go index 836fe37208..d0ac621483 100644 --- a/api/client/commands.go +++ b/api/client/commands.go @@ -1168,24 +1168,8 @@ func (cli *DockerCli) CmdImages(args ...string) error { return err } } - /* - var ( - untagged bool - ) - for k,v := range imageFilters { - } - */ - - // seeing -all untagged images is redundant, and no point in seeing a visualization of that - /* - if *flUntagged && (*all || *flViz || *flTree) { - fmt.Fprintln(cli.err, "Notice: --untagged is not to be used with --all, --tree or --viz") - *flUntagged = false - } - */ matchName := cmd.Arg(0) - // FIXME: --viz and --tree are deprecated. Remove them in a future version. if *flViz || *flTree { v := url.Values{ diff --git a/utils/filters/parse.go b/utils/filters/parse.go index d0cbe23c2a..a813be9ff9 100644 --- a/utils/filters/parse.go +++ b/utils/filters/parse.go @@ -22,9 +22,9 @@ func ParseFlag(arg string, prev map[string]string) (map[string]string, error) { } else { filters = map[string]string{} } - if len(arg) == 0 { - return filters, nil - } + if len(arg) == 0 { + return filters, nil + } for _, chunk := range strings.Split(arg, ";") { if !strings.Contains(chunk, "=") {