From bc5ea795c6fa2fa13a357af08e9dc5ea47380efa Mon Sep 17 00:00:00 2001 From: Denis Vaumoron Date: Fri, 31 May 2024 22:37:28 +0200 Subject: [PATCH] improve display --- cmd/go/last.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/go/last.go b/cmd/go/last.go index 5d4c9ce..55b62b8 100644 --- a/cmd/go/last.go +++ b/cmd/go/last.go @@ -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)