Remove obsolete flag `--json` (that was marked hidden), kept for VSCode extension but is not used, `docker context ls --format “{{ json . }}”` is used.

Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
This commit is contained in:
Guillaume Tardif 2020-11-04 14:54:01 +01:00
parent 4fc73d1cdf
commit db7d04db79
2 changed files with 0 additions and 5 deletions

View File

@ -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
}

View File

@ -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"))
})