From e406cb6d211f1082f70c7f5ab6c98944f86ad242 Mon Sep 17 00:00:00 2001 From: Gianmaria Del Monte Date: Thu, 10 Feb 2022 10:42:36 +0100 Subject: [PATCH] print version --- eos_exporter.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eos_exporter.go b/eos_exporter.go index 10a74e8..955cd14 100644 --- a/eos_exporter.go +++ b/eos_exporter.go @@ -126,7 +126,13 @@ func printUsage() { } func printVersion() { - + msg := `%s [%s] + go version = %s + build date = %s + commit = %s +` + fmt.Printf(msg, os.Args[0], version, goVersion, buildDate, gitCommit) + os.Exit(0) } func main() {