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

Function newUnlockCommand

cli/command/swarm/unlock.go:20–37  ·  view source on GitHub ↗
(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

18)
19
20func newUnlockCommand(dockerCLI command.Cli) *cobra.Command {
21 cmd := &cobra.Command{
22 Use: "unlock",
23 Short: "Unlock swarm",
24 Args: cli.NoArgs,
25 RunE: func(cmd *cobra.Command, args []string) error {
26 return runUnlock(cmd.Context(), dockerCLI)
27 },
28 Annotations: map[string]string{
29 "version": "1.24",
30 "swarm": "manager",
31 },
32 ValidArgsFunction: cobra.NoFileCompletions,
33 DisableFlagsInUseLine: true,
34 }
35
36 return cmd
37}
38
39func runUnlock(ctx context.Context, dockerCLI command.Cli) error {
40 apiClient := dockerCLI.Client()

Callers 3

newSwarmCommandFunction · 0.85
TestSwarmUnlockErrorsFunction · 0.85
TestSwarmUnlockFunction · 0.85

Calls 1

runUnlockFunction · 0.85

Tested by 2

TestSwarmUnlockErrorsFunction · 0.68
TestSwarmUnlockFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…