(w io.Writer, toolName, oldVersion, newVersion string)
| 203 | } |
| 204 | |
| 205 | func printSuccessMessage(w io.Writer, toolName, oldVersion, newVersion string) { |
| 206 | var msg string |
| 207 | if SemverCompare(oldVersion, newVersion) == 0 { |
| 208 | msg = fmt.Sprintf("already at %s version %s", toolName, newVersion) |
| 209 | } else { |
| 210 | msg = fmt.Sprintf("updated to %s version %s", toolName, newVersion) |
| 211 | } |
| 212 | |
| 213 | // Prints a <green>Success:</green> message to the writer. |
| 214 | // Move to ux.Success. Not doing so to minimize merge-conflicts. |
| 215 | fmt.Fprintf(w, "%s%s\n", color.New(color.FgGreen).Sprint("Success: "), msg) |
| 216 | } |
| 217 | |
| 218 | func launcherVersionNotice() string { |
| 219 | if !isNewLauncherAvailable() { |
no test coverage detected