From bbeb0d0e2b4538faed275b9891fb55149bc3a2f8 Mon Sep 17 00:00:00 2001 From: Bennett Wetters Date: Tue, 16 Jan 2024 02:20:45 +0100 Subject: [PATCH] Print version on startup, set this via -ldflags "-X main.version=foo" --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 7555e84..1ec02a5 100644 --- a/main.go +++ b/main.go @@ -18,6 +18,7 @@ import ( var ( flagHelp bool + version string ) func init() { @@ -25,6 +26,8 @@ func init() { } func main() { + log.Println("SpaceAPId version", version) + flag.Parse() if flagHelp { -- 2.44.1