fix(cli): align code with core grafana

This commit is contained in:
bergquist
2016-02-15 16:11:37 +01:00
parent 9c50b89d64
commit 746257710b
7 changed files with 17 additions and 19 deletions

View File

@ -19,14 +19,14 @@ func removeCommand(c CommandLine) error {
plugin := c.Args().First()
log.Info("plugin: " + plugin + "\n")
if plugin == "" {
return errors.New("Missing which plugin parameter")
return errors.New("Missing plugin parameter")
}
log.Infof("plugins : \n%v\n", localPlugins)
for _, p := range localPlugins {
log.Infof("is %s == %s ? %v", p.Id, c.Args().First(), p.Id == c.Args().First())
if p.Id == c.Args().First() {
log.Infof("removing plugin %s", p.Id)
removePlugin(pluginPath, p.Id)
}
}