Merge pull request #878 from gtardif/remove_obsolete_hidden_json_flag

Remove obsolete flag `docker context ls --json` (that was marked hidden)
This commit is contained in:
Guillaume Tardif 2020-11-05 13:38:12 +01:00 committed by GitHub
commit 2121cc5ca6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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"))
})