inspect: update flag description of "--type" flag

Before this patch:

    docker inspect --help | grep '\-\-type'
          --type string     Return JSON for specified type

With this patch:

    docker inspect --help | grep '\-\-type'
          --type string     Only inspect objects of the given type

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2025-05-06 14:49:26 +02:00
parent 7203340f53
commit 8c5aaff57f
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
2 changed files with 2 additions and 2 deletions

View File

@ -77,7 +77,7 @@ func NewInspectCommand(dockerCli command.Cli) *cobra.Command {
flags := cmd.Flags()
flags.StringVarP(&opts.format, "format", "f", "", flagsHelper.InspectFormatHelp)
flags.StringVar(&opts.objectType, "type", "", "Return JSON for specified type")
flags.StringVar(&opts.objectType, "type", "", "Only inspect objects of the given type")
flags.BoolVarP(&opts.size, "size", "s", false, "Display total file sizes if the type is container")
_ = cmd.RegisterFlagCompletionFunc("type", completion.FromList(allTypes...))

View File

@ -9,7 +9,7 @@ Return low-level information on Docker objects
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| [`-s`](#size), [`--size`](#size) | `bool` | | Display total file sizes if the type is container |
| [`--type`](#type) | `string` | | Return JSON for specified type |
| [`--type`](#type) | `string` | | Only inspect objects of the given type |
<!---MARKER_GEN_END-->