From e4039aec7c34671f3f0deb934621fd637152a113 Mon Sep 17 00:00:00 2001 From: David Newhall II Date: Sun, 22 Nov 2020 16:21:14 -0800 Subject: [PATCH] Add version. --- info.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/info.go b/info.go index 8247ad6..e7fd8cb 100644 --- a/info.go +++ b/info.go @@ -19,6 +19,7 @@ import ( "runtime" "strings" "text/template" + "time" ) // Build information. Populated at build-time. @@ -29,6 +30,7 @@ var ( BuildUser string BuildDate string GoVersion = runtime.Version() + Started = time.Now() ) // versionInfoTmpl contains the template used by Info. @@ -38,11 +40,13 @@ const versionInfoTmpl = ` build date: {{.buildDate}} go version: {{.goVersion}} platform: {{.platform}} + started: {{.started}} ` // Print returns version information. func Print(program string) string { m := map[string]string{ + "started": Started.String(), "program": program, "version": Version, "revision": Revision,