(dockerCLI command.Cli)
| 23 | } |
| 24 | |
| 25 | func newSecretInspectCommand(dockerCLI command.Cli) *cobra.Command { |
| 26 | opts := inspectOptions{} |
| 27 | cmd := &cobra.Command{ |
| 28 | Use: "inspect [OPTIONS] SECRET [SECRET...]", |
| 29 | Short: "Display detailed information on one or more secrets", |
| 30 | Args: cli.RequiresMinArgs(1), |
| 31 | RunE: func(cmd *cobra.Command, args []string) error { |
| 32 | opts.names = args |
| 33 | return runSecretInspect(cmd.Context(), dockerCLI, opts) |
| 34 | }, |
| 35 | ValidArgsFunction: completeNames(dockerCLI), |
| 36 | DisableFlagsInUseLine: true, |
| 37 | } |
| 38 | |
| 39 | cmd.Flags().StringVarP(&opts.format, "format", "f", "", flagsHelper.InspectFormatHelp) |
| 40 | cmd.Flags().BoolVar(&opts.pretty, "pretty", false, "Print the information in a human friendly format") |
| 41 | return cmd |
| 42 | } |
| 43 | |
| 44 | func runSecretInspect(ctx context.Context, dockerCLI command.Cli, opts inspectOptions) error { |
| 45 | apiClient := dockerCLI.Client() |
searching dependent graphs…