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

Function newServiceCommand

cli/command/service/cmd.go:15–39  ·  view source on GitHub ↗

newServiceCommand returns a cobra command for `service` subcommands

(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

13
14// newServiceCommand returns a cobra command for `service` subcommands
15func 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}

Callers

nothing calls this directly

Calls 10

newScaleCommandFunction · 0.85
newRollbackCommandFunction · 0.85
newCreateCommandFunction · 0.70
newInspectCommandFunction · 0.70
newPsCommandFunction · 0.70
newListCommandFunction · 0.70
newRemoveCommandFunction · 0.70
newUpdateCommandFunction · 0.70
newLogsCommandFunction · 0.70
ErrMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…