Skip to content

Commit

Permalink
improve display
Browse files Browse the repository at this point in the history
  • Loading branch information
dvaumoron committed May 31, 2024
1 parent a4c4b76 commit bc5ea79
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cmd/go/last.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ func main() {
notInstalled := installedVersion == ""
if notInstalled || datefile.OutsideInterval(conf.dateFilePath, conf.checkInterval) {
if lastVersionDesc := getLastVersion(conf); installedVersion != lastVersionDesc.version {
fmt.Print("Update to ", lastVersionDesc.version)
doUpdate := true
if notInstalled || conf.noConfirm {
fmt.Println()
if notInstalled {
fmt.Println("Install", lastVersionDesc.version)
} else if conf.noConfirm {
fmt.Println("Update to", lastVersionDesc.version)
} else {
fmt.Print(" ? [y/N]:")
fmt.Print("Update to ", lastVersionDesc.version, " ? [y/N]:")

buffer := make([]byte, 1)
os.Stdin.Read(buffer)
Expand Down

0 comments on commit bc5ea79

Please sign in to comment.