(out io.Writer)
| 33 | } |
| 34 | |
| 35 | func newPluginUpdateCmd(out io.Writer) *cobra.Command { |
| 36 | o := &pluginUpdateOptions{} |
| 37 | |
| 38 | cmd := &cobra.Command{ |
| 39 | Use: "update <plugin>...", |
| 40 | Aliases: []string{"up"}, |
| 41 | Short: "update 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 *pluginUpdateOptions) complete(args []string) error { |
| 56 | if len(args) == 0 { |
no test coverage detected
searching dependent graphs…