(dockerCLI command.Cli)
| 18 | ) |
| 19 | |
| 20 | func 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 | |
| 39 | func runUnlock(ctx context.Context, dockerCLI command.Cli) error { |
| 40 | apiClient := dockerCLI.Client() |
searching dependent graphs…