(out io.Writer)
| 33 | } |
| 34 | |
| 35 | func newPluginUninstallCmd(out io.Writer) *cobra.Command { |
| 36 | o := &pluginUninstallOptions{} |
| 37 | |
| 38 | cmd := &cobra.Command{ |
| 39 | Use: "uninstall <plugin>...", |
| 40 | Aliases: []string{"rm", "remove"}, |
| 41 | Short: "uninstall one or more Helm plugins", |
| 42 | ValidArgsFunction: func(_ *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { |
| 43 | return compListPlugins(toComplete, args), cobra.ShellCompDirectiveNoFileComp |
| 44 | }, |
| 45 | PreRunE: func(_ *cobra.Command, args []string) error { |
| 46 | return o.complete(args) |
| 47 | }, |
| 48 | RunE: func(_ *cobra.Command, _ []string) error { |
| 49 | return o.run(out) |
| 50 | }, |
| 51 | } |
| 52 | return cmd |
| 53 | } |
| 54 | |
| 55 | func (o *pluginUninstallOptions) complete(args []string) error { |
| 56 | if len(args) == 0 { |
no test coverage detected
searching dependent graphs…