(dockerCLI command.Cli)
| 20 | } |
| 21 | |
| 22 | func newInspectCommand(dockerCLI command.Cli) *cobra.Command { |
| 23 | var opts inspectOptions |
| 24 | |
| 25 | cmd := &cobra.Command{ |
| 26 | Use: "inspect [OPTIONS] PLUGIN [PLUGIN...]", |
| 27 | Short: "Display detailed information on one or more plugins", |
| 28 | Args: cli.RequiresMinArgs(1), |
| 29 | RunE: func(cmd *cobra.Command, args []string) error { |
| 30 | opts.pluginNames = args |
| 31 | return runInspect(cmd.Context(), dockerCLI, opts) |
| 32 | }, |
| 33 | ValidArgsFunction: completeNames(dockerCLI, stateAny), |
| 34 | DisableFlagsInUseLine: true, |
| 35 | } |
| 36 | |
| 37 | flags := cmd.Flags() |
| 38 | flags.StringVarP(&opts.format, "format", "f", "", flagsHelper.InspectFormatHelp) |
| 39 | return cmd |
| 40 | } |
| 41 | |
| 42 | func runInspect(ctx context.Context, dockerCLI command.Cli, opts inspectOptions) error { |
| 43 | apiClient := dockerCLI.Client() |
searching dependent graphs…