Skip to content

Commit e4039ae

Browse files
committed
Add version.
1 parent 49b267d commit e4039ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

info.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"runtime"
2020
"strings"
2121
"text/template"
22+
"time"
2223
)
2324

2425
// Build information. Populated at build-time.
@@ -29,6 +30,7 @@ var (
2930
BuildUser string
3031
BuildDate string
3132
GoVersion = runtime.Version()
33+
Started = time.Now()
3234
)
3335

3436
// versionInfoTmpl contains the template used by Info.
@@ -38,11 +40,13 @@ const versionInfoTmpl = `
3840
build date: {{.buildDate}}
3941
go version: {{.goVersion}}
4042
platform: {{.platform}}
43+
started: {{.started}}
4144
`
4245

4346
// Print returns version information.
4447
func Print(program string) string {
4548
m := map[string]string{
49+
"started": Started.String(),
4650
"program": program,
4751
"version": Version,
4852
"revision": Revision,

0 commit comments

Comments
 (0)