cli-plugins: use only the first word of `Use` as the name

This can be obtained with the `.Name()` method.

Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
Ian Campbell 2019-02-01 10:34:44 +00:00
parent 2344627564
commit 8fa7c572d4
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ func PersistentPreRunE(cmd *cobra.Command, args []string) error {
} }
func newPluginCommand(dockerCli *command.DockerCli, plugin *cobra.Command, meta manager.Metadata) *cobra.Command { func newPluginCommand(dockerCli *command.DockerCli, plugin *cobra.Command, meta manager.Metadata) *cobra.Command {
name := plugin.Use name := plugin.Name()
fullname := manager.NamePrefix + name fullname := manager.NamePrefix + name
cmd := &cobra.Command{ cmd := &cobra.Command{