newServiceCommand returns a cobra command for `service` subcommands
(dockerCLI command.Cli)
| 13 | |
| 14 | // newServiceCommand returns a cobra command for `service` subcommands |
| 15 | func newServiceCommand(dockerCLI command.Cli) *cobra.Command { |
| 16 | cmd := &cobra.Command{ |
| 17 | Use: "service", |
| 18 | Short: "Manage Swarm services", |
| 19 | Args: cli.NoArgs, |
| 20 | RunE: command.ShowHelp(dockerCLI.Err()), |
| 21 | Annotations: map[string]string{ |
| 22 | "version": "1.24", |
| 23 | "swarm": "manager", |
| 24 | }, |
| 25 | DisableFlagsInUseLine: true, |
| 26 | } |
| 27 | cmd.AddCommand( |
| 28 | newCreateCommand(dockerCLI), |
| 29 | newInspectCommand(dockerCLI), |
| 30 | newPsCommand(dockerCLI), |
| 31 | newListCommand(dockerCLI), |
| 32 | newRemoveCommand(dockerCLI), |
| 33 | newScaleCommand(dockerCLI), |
| 34 | newUpdateCommand(dockerCLI), |
| 35 | newLogsCommand(dockerCLI), |
| 36 | newRollbackCommand(dockerCLI), |
| 37 | ) |
| 38 | return cmd |
| 39 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…