mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-25 18:07:07 +09:00
plugin installer: Remove extra spaces in log messages
This commit is contained in:
@@ -650,14 +650,14 @@ func PluginCommand(out io.Writer, cmd string, args []string) {
|
|||||||
if pp == nil {
|
if pp == nil {
|
||||||
fmt.Fprintln(out, "Unknown plugin \""+plugin+"\"")
|
fmt.Fprintln(out, "Unknown plugin \""+plugin+"\"")
|
||||||
} else if err := pp.IsInstallable(out); err != nil {
|
} else if err := pp.IsInstallable(out); err != nil {
|
||||||
fmt.Fprintln(out, "Error installing ", plugin, ": ", err)
|
fmt.Fprintln(out, "Error installing "+plugin+": ", err)
|
||||||
} else {
|
} else {
|
||||||
for _, installed := range installedVersions {
|
for _, installed := range installedVersions {
|
||||||
if pp.Name == installed.Pack().Name {
|
if pp.Name == installed.Pack().Name {
|
||||||
if pp.Versions[0].Version.Compare(installed.Version) == 1 {
|
if pp.Versions[0].Version.Compare(installed.Version) == 1 {
|
||||||
fmt.Fprintln(out, pp.Name, " is already installed but out-of-date: use 'plugin update ", pp.Name, "' to update")
|
fmt.Fprintln(out, pp.Name, "is already installed but out-of-date: use 'plugin update "+pp.Name+"' to update")
|
||||||
} else {
|
} else {
|
||||||
fmt.Fprintln(out, pp.Name, " is already installed")
|
fmt.Fprintln(out, pp.Name, "is already installed")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -685,8 +685,9 @@ func PluginCommand(out io.Writer, cmd string, args []string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
removed = strings.TrimSpace(removed)
|
||||||
if removed != "" {
|
if removed != "" {
|
||||||
fmt.Fprintln(out, "Removed ", removed)
|
fmt.Fprintln(out, "Removed", removed)
|
||||||
} else {
|
} else {
|
||||||
fmt.Fprintln(out, "No plugins removed")
|
fmt.Fprintln(out, "No plugins removed")
|
||||||
}
|
}
|
||||||
@@ -706,7 +707,7 @@ func PluginCommand(out io.Writer, cmd string, args []string) {
|
|||||||
}
|
}
|
||||||
case "search":
|
case "search":
|
||||||
plugins := SearchPlugin(out, args)
|
plugins := SearchPlugin(out, args)
|
||||||
fmt.Fprintln(out, len(plugins), " plugins found")
|
fmt.Fprintln(out, len(plugins), "plugins found")
|
||||||
for _, p := range plugins {
|
for _, p := range plugins {
|
||||||
fmt.Fprintln(out, "----------------")
|
fmt.Fprintln(out, "----------------")
|
||||||
fmt.Fprintln(out, p.String())
|
fmt.Fprintln(out, p.String())
|
||||||
|
|||||||
Reference in New Issue
Block a user