mirror of https://github.com/docker/cli.git
29 lines
658 B
Go
29 lines
658 B
Go
|
package context
|
||
|
|
||
|
import (
|
||
|
"github.com/docker/cli/cli"
|
||
|
"github.com/docker/cli/cli/command"
|
||
|
"github.com/spf13/cobra"
|
||
|
)
|
||
|
|
||
|
// NewContextCommand returns the context cli subcommand
|
||
|
func NewContextCommand(dockerCli command.Cli) *cobra.Command {
|
||
|
cmd := &cobra.Command{
|
||
|
Use: "context",
|
||
|
Short: "Manage contexts",
|
||
|
Args: cli.NoArgs,
|
||
|
RunE: command.ShowHelp(dockerCli.Err()),
|
||
|
}
|
||
|
cmd.AddCommand(
|
||
|
newCreateCommand(dockerCli),
|
||
|
newListCommand(dockerCli),
|
||
|
newUseCommand(dockerCli),
|
||
|
newExportCommand(dockerCli),
|
||
|
newImportCommand(dockerCli),
|
||
|
newRemoveCommand(dockerCli),
|
||
|
newUpdateCommand(dockerCli),
|
||
|
newInspectCommand(dockerCli),
|
||
|
)
|
||
|
return cmd
|
||
|
}
|