github.com/thajeztah/cli@v0.0.0-20240223162942-dc6bfac81a8b/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 }