Plugins: Tidy up CLI code (#67723)

* remove dead code and use pkg/plugins for uninstall process

* fix linter

* remove unnecessary cruft
This commit is contained in:
Will Browne
2023-05-04 10:52:09 +02:00
committed by GitHub
parent 3644ea6556
commit fd28c8490f
11 changed files with 25 additions and 74 deletions
@@ -25,12 +25,12 @@ func shouldUpgrade(installed string, remote *models.Plugin) bool {
return installedVersion.LessThan(latestVersion)
}
func (cmd Command) upgradeAllCommand(c utils.CommandLine) error {
func upgradeAllCommand(c utils.CommandLine) error {
pluginsDir := c.PluginDirectory()
localPlugins := services.GetLocalPlugins(pluginsDir)
remotePlugins, err := cmd.Client.ListAllPlugins(c.String("repo"))
remotePlugins, err := services.ListAllPlugins(c.String("repo"))
if err != nil {
return err
}