From 43f1e8787f02627f87bba6b3f44827fe0fa5870f Mon Sep 17 00:00:00 2001 From: yurii Date: Thu, 8 Jan 2026 17:11:42 +0000 Subject: [PATCH] added count down before exiting the preauth releaser 20 seconds --- hardlink-preauth-release/main.go | 10 +++++++--- main.go | 2 +- release notes.md | 3 +++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/hardlink-preauth-release/main.go b/hardlink-preauth-release/main.go index e5e5749..0dfa829 100644 --- a/hardlink-preauth-release/main.go +++ b/hardlink-preauth-release/main.go @@ -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) } diff --git a/main.go b/main.go index 9bd235b..39c5b4c 100644 --- a/main.go +++ b/main.go @@ -25,7 +25,7 @@ import ( ) const ( - buildVersion = "1.0.28" + buildVersion = "1.0.29" serviceName = "hardlink" ) diff --git a/release notes.md b/release notes.md index 2a6ecda..86b133f 100644 --- a/release notes.md +++ b/release notes.md @@ -2,6 +2,9 @@ builtVersion is a const in main.go +#### 1.0.29 - 08 January 2026 +added count down before exiting the preauth releaser 20 seconds + #### 1.0.28 - 10 December 2025 added preauth releaser