From db7d04db795710d1a13ea5c1cee4446af3dc27e3 Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Wed, 4 Nov 2020 14:54:01 +0100 Subject: [PATCH] =?UTF-8?q?Remove=20obsolete=20flag=20`--json`=20(that=20w?= =?UTF-8?q?as=20marked=20hidden),=20kept=20for=20VSCode=20extension=20but?= =?UTF-8?q?=20is=20not=20used,=20`docker=20context=20ls=20--format=20?= =?UTF-8?q?=E2=80=9C{{=20json=20.=20}}=E2=80=9D`=20is=20used.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Guillaume Tardif --- cli/cmd/context/ls.go | 2 -- tests/e2e/e2e_test.go | 3 --- 2 files changed, 5 deletions(-) diff --git a/cli/cmd/context/ls.go b/cli/cmd/context/ls.go index f4485d62..b5119328 100644 --- a/cli/cmd/context/ls.go +++ b/cli/cmd/context/ls.go @@ -57,9 +57,7 @@ func listCommand() *cobra.Command { }, } cmd.Flags().BoolVarP(&opts.quiet, "quiet", "q", false, "Only show context names") - cmd.Flags().BoolVar(&opts.json, "json", false, "Format output as JSON") cmd.Flags().StringVar(&opts.format, "format", "", "Format the output. Values: [pretty | json]. (Default: pretty)") - _ = cmd.Flags().MarkHidden("json") return cmd } diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index b79775ea..f404bded 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -82,9 +82,6 @@ func TestContextDefault(t *testing.T) { res = c.RunDockerCmd("context", "ls", "--format", "json") golden.Assert(t, res.Stdout(), GoldenFile("ls-out-json")) - res = c.RunDockerCmd("context", "ls", "--json") - golden.Assert(t, res.Stdout(), GoldenFile("ls-out-json")) - res = c.RunDockerCmd("context", "ls", "--format", "{{ json . }}") golden.Assert(t, res.Stdout(), GoldenFile("ls-out-legacy-json")) })