()
| 44 | } |
| 45 | |
| 46 | func (v *VersionInfo) PromptUpdateIfAvailable() { |
| 47 | if v.IsOutdated { |
| 48 | fmt.Fprintln(os.Stderr, "A new version of the bootdev CLI is available!") |
| 49 | fmt.Fprintln(os.Stderr, "Please run the following command to update:") |
| 50 | fmt.Fprintln(os.Stderr, " bootdev upgrade") |
| 51 | fmt.Fprintln(os.Stderr, "or") |
| 52 | fmt.Fprintf(os.Stderr, " go install github.com/bootdotdev/bootdev@%s\n\n", v.LatestVersion) |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | // Returns true if the current version is older than the latest. |
| 57 | func isOutdated(current string, latest string) bool { |
no outgoing calls
no test coverage detected