github.com/vieux/docker@v0.6.3-0.20161004191708-e097c2a938c7/cli/command/plugin/cmd_experimental.go (about)

     1  // +build experimental
     2  
     3  package plugin
     4  
     5  import (
     6  	"fmt"
     7  
     8  	"github.com/docker/docker/cli"
     9  	"github.com/docker/docker/cli/command"
    10  	"github.com/spf13/cobra"
    11  )
    12  
    13  // NewPluginCommand returns a cobra command for `plugin` subcommands
    14  func NewPluginCommand(dockerCli *command.DockerCli) *cobra.Command {
    15  	cmd := &cobra.Command{
    16  		Use:   "plugin",
    17  		Short: "Manage plugins",
    18  		Args:  cli.NoArgs,
    19  		Run: func(cmd *cobra.Command, args []string) {
    20  			fmt.Fprintf(dockerCli.Err(), "\n"+cmd.UsageString())
    21  		},
    22  	}
    23  
    24  	cmd.AddCommand(
    25  		newDisableCommand(dockerCli),
    26  		newEnableCommand(dockerCli),
    27  		newInspectCommand(dockerCli),
    28  		newInstallCommand(dockerCli),
    29  		newListCommand(dockerCli),
    30  		newRemoveCommand(dockerCli),
    31  		newSetCommand(dockerCli),
    32  		newPushCommand(dockerCli),
    33  	)
    34  	return cmd
    35  }