From 802a030d7ccb2dfa0da8b48c6f27bc08764602c2 Mon Sep 17 00:00:00 2001 From: Pavlo Golub Date: Tue, 24 Sep 2024 11:54:51 +0200 Subject: [PATCH] [+] add build `commit` and `date` to `--version` output, closes #256 --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 7a0862a..6a226bc 100644 --- a/main.go +++ b/main.go @@ -20,7 +20,9 @@ import ( var ( // vip-manager version definition - version = "2.4.0" + version = "master" + commit = "none" + date = "unknown" ) func getMask(vip netip.Addr, mask int) net.IPMask { @@ -48,6 +50,8 @@ func main() { // return nil, nil // } fmt.Printf("version: %s\n", version) + fmt.Printf("commit: %s\n", commit) + fmt.Printf("date: %s\n", date) return }