github.com/itscaro/cli@v0.0.0-20190705081621-c9db0fe93829/cli/command/plugin/cmd.go (about)

     1  package plugin
     2  
     3  import (
     4  	"github.com/docker/cli/cli"
     5  	"github.com/docker/cli/cli/command"
     6  	"github.com/spf13/cobra"
     7  )
     8  
     9  // NewPluginCommand returns a cobra command for `plugin` subcommands
    10  func NewPluginCommand(dockerCli command.Cli) *cobra.Command {
    11  	cmd := &cobra.Command{
    12  		Use:         "plugin",
    13  		Short:       "Manage plugins",
    14  		Args:        cli.NoArgs,
    15  		RunE:        command.ShowHelp(dockerCli.Err()),
    16  		Annotations: map[string]string{"version": "1.25"},
    17  	}
    18  
    19  	cmd.AddCommand(
    20  		newDisableCommand(dockerCli),
    21  		newEnableCommand(dockerCli),
    22  		newInspectCommand(dockerCli),
    23  		newInstallCommand(dockerCli),
    24  		newListCommand(dockerCli),
    25  		newRemoveCommand(dockerCli),
    26  		newSetCommand(dockerCli),
    27  		newPushCommand(dockerCli),
    28  		newCreateCommand(dockerCli),
    29  		newUpgradeCommand(dockerCli),
    30  	)
    31  	return cmd
    32  }