mirror of https://github.com/docker/compose.git
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:
parent
4fc73d1cdf
commit
db7d04db79
|
@ -57,9 +57,7 @@ func listCommand() *cobra.Command {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
cmd.Flags().BoolVarP(&opts.quiet, "quiet", "q", false, "Only show context names")
|
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().StringVar(&opts.format, "format", "", "Format the output. Values: [pretty | json]. (Default: pretty)")
|
||||||
_ = cmd.Flags().MarkHidden("json")
|
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,9 +82,6 @@ func TestContextDefault(t *testing.T) {
|
||||||
res = c.RunDockerCmd("context", "ls", "--format", "json")
|
res = c.RunDockerCmd("context", "ls", "--format", "json")
|
||||||
golden.Assert(t, res.Stdout(), GoldenFile("ls-out-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 . }}")
|
res = c.RunDockerCmd("context", "ls", "--format", "{{ json . }}")
|
||||||
golden.Assert(t, res.Stdout(), GoldenFile("ls-out-legacy-json"))
|
golden.Assert(t, res.Stdout(), GoldenFile("ls-out-legacy-json"))
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue