-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Expand file tree
/
Copy pathcmd.go
More file actions
39 lines (36 loc) · 923 Bytes
/
cmd.go
File metadata and controls
39 lines (36 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package service
import (
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/internal/commands"
"github.com/spf13/cobra"
)
func init() {
commands.Register(newServiceCommand)
}
// newServiceCommand returns a cobra command for `service` subcommands
func newServiceCommand(dockerCLI command.Cli) *cobra.Command {
cmd := &cobra.Command{
Use: "service",
Short: "Manage Swarm services",
Args: cli.NoArgs,
RunE: command.ShowHelp(dockerCLI.Err()),
Annotations: map[string]string{
"version": "1.24",
"swarm": "manager",
},
DisableFlagsInUseLine: true,
}
cmd.AddCommand(
newCreateCommand(dockerCLI),
newInspectCommand(dockerCLI),
newPsCommand(dockerCLI),
newListCommand(dockerCLI),
newRemoveCommand(dockerCLI),
newScaleCommand(dockerCLI),
newUpdateCommand(dockerCLI),
newLogsCommand(dockerCLI),
newRollbackCommand(dockerCLI),
)
return cmd
}