2017-05-08 13:36:04 -04:00
|
|
|
package config
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
|
|
|
|
"github.com/docker/cli/cli"
|
|
|
|
"github.com/docker/cli/cli/command"
|
|
|
|
)
|
|
|
|
|
|
|
|
// NewConfigCommand returns a cobra command for `config` subcommands
|
2017-10-11 12:18:27 -04:00
|
|
|
func NewConfigCommand(dockerCli command.Cli) *cobra.Command {
|
2017-05-08 13:36:04 -04:00
|
|
|
cmd := &cobra.Command{
|
2017-10-25 12:59:32 -04:00
|
|
|
Use: "config",
|
|
|
|
Short: "Manage Docker configs",
|
|
|
|
Args: cli.NoArgs,
|
|
|
|
RunE: command.ShowHelp(dockerCli.Err()),
|
|
|
|
Annotations: map[string]string{"version": "1.30"},
|
2017-05-08 13:36:04 -04:00
|
|
|
}
|
|
|
|
cmd.AddCommand(
|
|
|
|
newConfigListCommand(dockerCli),
|
|
|
|
newConfigCreateCommand(dockerCli),
|
|
|
|
newConfigInspectCommand(dockerCli),
|
|
|
|
newConfigRemoveCommand(dockerCli),
|
|
|
|
)
|
|
|
|
return cmd
|
|
|
|
}
|