Output compact JSON by default for --format=json

With this change all `inspect` commands will output a compact JSON
representation of the elements, the default format (indented JSON) stays the
same.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Djordje Lukic
2022-03-08 14:54:21 +01:00
committed by Sebastiaan van Stijn
parent d8ecb00dda
commit 9c0234bbcb
22 changed files with 70 additions and 52 deletions

View File

@ -28,7 +28,7 @@ func newInspectCommand(dockerCli command.Cli) *cobra.Command {
},
}
cmd.Flags().StringVarP(&opts.format, "format", "f", "json", flagsHelper.InspectFormatHelp)
cmd.Flags().StringVarP(&opts.format, "format", "f", "", flagsHelper.InspectFormatHelp)
return cmd
}