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:
@@ -4,6 +4,7 @@ import (
|
||||
"errors"
|
||||
|
||||
"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"
|
||||
)
|
||||
|
||||
@@ -16,14 +17,14 @@ func validateVersionInput(c utils.CommandLine) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (cmd Command) listVersionsCommand(c utils.CommandLine) error {
|
||||
func listVersionsCommand(c utils.CommandLine) error {
|
||||
if err := validateVersionInput(c); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
pluginToList := c.Args().First()
|
||||
|
||||
plugin, err := cmd.Client.GetPlugin(pluginToList, c.String("repo"))
|
||||
plugin, err := services.GetPlugin(pluginToList, c.String("repo"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user