MCPcopy Create free account
hub / github.com/docker/cli / newSecretRemoveCommand

Function newSecretRemoveCommand

cli/command/secret/remove.go:18–33  ·  view source on GitHub ↗
(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

16}
17
18func newSecretRemoveCommand(dockerCLI command.Cli) *cobra.Command {
19 return &cobra.Command{
20 Use: "rm SECRET [SECRET...]",
21 Aliases: []string{"remove"},
22 Short: "Remove one or more secrets",
23 Args: cli.RequiresMinArgs(1),
24 RunE: func(cmd *cobra.Command, args []string) error {
25 opts := removeOptions{
26 names: args,
27 }
28 return runRemove(cmd.Context(), dockerCLI, opts)
29 },
30 ValidArgsFunction: completeNames(dockerCLI),
31 DisableFlagsInUseLine: true,
32 }
33}
34
35func runRemove(ctx context.Context, dockerCLI command.Cli, opts removeOptions) error {
36 apiClient := dockerCLI.Client()

Callers 4

newSecretCommandFunction · 0.85
TestSecretRemoveErrorsFunction · 0.85
TestSecretRemoveWithNameFunction · 0.85

Calls 2

runRemoveFunction · 0.70
completeNamesFunction · 0.70

Tested by 3

TestSecretRemoveErrorsFunction · 0.68
TestSecretRemoveWithNameFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…