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

Function newInspectCommand

cli/command/volume/inspect.go:23–41  ·  view source on GitHub ↗
(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

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

Callers 5

TestVolumeInspectErrorsFunction · 0.70
TestVolumeInspectClusterFunction · 0.70
newVolumeCommandFunction · 0.70

Calls 1

runInspectFunction · 0.70

Tested by 4

TestVolumeInspectErrorsFunction · 0.56
TestVolumeInspectClusterFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…