Skip to content

Commit

Permalink
Extend version.Print with platform info (#258)
Browse files Browse the repository at this point in the history
* Extend version.Print with platform info

Signed-off-by: Daniil Rutskiy <dstdfx@gmail.com>
  • Loading branch information
dstdfx committed Sep 23, 2020
1 parent f39dfa2 commit 317b7b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions version/info.go
Expand Up @@ -61,6 +61,7 @@ var versionInfoTmpl = `
build user: {{.buildUser}}
build date: {{.buildDate}}
go version: {{.goVersion}}
platform: {{.platform}}
`

// Print returns version information.
Expand All @@ -73,6 +74,7 @@ func Print(program string) string {
"buildUser": BuildUser,
"buildDate": BuildDate,
"goVersion": GoVersion,
"platform": runtime.GOOS + "/" + runtime.GOARCH,
}
t := template.Must(template.New("version").Parse(versionInfoTmpl))

Expand Down

0 comments on commit 317b7b1

Please sign in to comment.