-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Expand file tree
/
Copy pathcmd.go
More file actions
37 lines (32 loc) · 870 Bytes
/
cmd.go
File metadata and controls
37 lines (32 loc) · 870 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
package system
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(newVersionCommand)
commands.Register(newInfoCommand)
commands.Register(newSystemCommand)
commands.RegisterLegacy(newEventsCommand)
commands.RegisterLegacy(newInspectCommand)
}
// newSystemCommand returns a cobra command for `system` subcommands
func newSystemCommand(dockerCLI command.Cli) *cobra.Command {
cmd := &cobra.Command{
Use: "system",
Short: "Manage Docker",
Args: cli.NoArgs,
RunE: command.ShowHelp(dockerCLI.Err()),
DisableFlagsInUseLine: true,
}
cmd.AddCommand(
newEventsCommand(dockerCLI),
newInfoCommand(dockerCLI),
newDiskUsageCommand(dockerCLI),
newPruneCommand(dockerCLI),
newDialStdioCommand(dockerCLI),
)
return cmd
}