MCPcopy Index your code
hub / github.com/docker/cli / newInspectCommand

Function newInspectCommand

cli/command/plugin/inspect.go:22–40  ·  view source on GitHub ↗
(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

20}
21
22func 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
42func runInspect(ctx context.Context, dockerCLI command.Cli, opts inspectOptions) error {
43 apiClient := dockerCLI.Client()

Callers 3

TestInspectErrorsFunction · 0.70
TestInspectFunction · 0.70
newPluginCommandFunction · 0.70

Calls 2

runInspectFunction · 0.70
completeNamesFunction · 0.70

Tested by 2

TestInspectErrorsFunction · 0.56
TestInspectFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…