added count down before exiting the preauth releaser 20 seconds

This commit is contained in:
2026-01-08 17:12:51 +00:00
parent 7941e2065e
commit 43f1e8787f
3 changed files with 11 additions and 4 deletions
+7 -3
View File
@@ -4,6 +4,7 @@ package main
import (
"fmt"
"os"
"time"
"gitea.futuresens.co.uk/futuresens/hardlink/bootstrap"
"gitea.futuresens.co.uk/futuresens/hardlink/config"
@@ -13,7 +14,7 @@ import (
)
const (
buildVersion = "1.0.0"
buildVersion = "1.0.1"
serviceName = "preauth-release"
)
@@ -36,7 +37,10 @@ func main() {
}
log.Info("Task completed successfully")
fmt.Println(". Press Enter to exit...")
fmt.Scanln()
for i := 20; i > 0; i-- {
fmt.Printf("\rExiting in %2d seconds...", i)
time.Sleep(time.Second)
}
fmt.Println("\rExiting now. ")
os.Exit(0)
}