Skip to content

Commit 5750c18

Browse files
committed
replace ldflag version.Platform with runtime.GOOS and runtime.GOARCH
1 parent bd67a58 commit 5750c18

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

cmd/helpers.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ package cmd
22

33
import (
44
"fmt"
5+
"runtime"
56

67
"github.com/jetstack/preflight/pkg/client"
78
"github.com/jetstack/preflight/pkg/version"
89
)
910

1011
func printVersion(verbose bool) {
11-
fmt.Println("Preflight version: ", version.PreflightVersion, version.Platform)
12+
fmt.Println("Preflight version: ", version.PreflightVersion, runtime.GOOS+"/"+runtime.GOARCH)
1213
if verbose {
1314
fmt.Println(" Commit: ", version.Commit)
1415
fmt.Println(" Built: ", version.BuildDate)

pkg/version/version.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,3 @@ var BuildDate string
1313

1414
// GoVersion is the go version that was used to compile this
1515
var GoVersion string
16-
17-
// Platform is the target platform this was compiled for
18-
var Platform string

0 commit comments

Comments
 (0)