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
@@ -2,13 +2,14 @@ package commands
import (
"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/services"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/utils"
)
// listRemoteCommand prints out all plugins in the remote repo with latest version supported on current platform.
// If there are no supported versions for plugin it is skipped.
func (cmd Command) listRemoteCommand(c utils.CommandLine) error {
plugin, err := cmd.Client.ListAllPlugins(c.PluginRepoURL())
func listRemoteCommand(c utils.CommandLine) error {
plugin, err := services.ListAllPlugins(c.PluginRepoURL())
if err != nil {
return err
}