Skip to content

Commit 317b7b1

Browse files
authored
Extend version.Print with platform info (#258)
* Extend version.Print with platform info Signed-off-by: Daniil Rutskiy <[email protected]>
1 parent f39dfa2 commit 317b7b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

version/info.go

+2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ var versionInfoTmpl = `
6161
build user: {{.buildUser}}
6262
build date: {{.buildDate}}
6363
go version: {{.goVersion}}
64+
platform: {{.platform}}
6465
`
6566

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

0 commit comments

Comments
 (0)