diff --git a/cmd/version.go b/cmd/version.go index 4645706c..b76f6ce1 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -12,7 +12,7 @@ var versionCmd = &cobra.Command{ Short: "Prints the version of Xatu.", Long: `Prints the version of Xatu.`, Run: func(cmd *cobra.Command, args []string) { - fmt.Printf("xatu version %s %s %s/%s\n", xatu.Release, xatu.GitCommit, xatu.GOOS, xatu.GOARCH) + fmt.Printf("%s\n", xatu.FullVWithPlatform()) }, } diff --git a/pkg/proto/xatu/xatu.go b/pkg/proto/xatu/xatu.go index fae9210f..cafe17d7 100644 --- a/pkg/proto/xatu/xatu.go +++ b/pkg/proto/xatu/xatu.go @@ -34,6 +34,10 @@ func FullVWithGOOS() string { return fmt.Sprintf("%s/%s", Full(), GOOS) } +func FullVWithPlatform() string { + return fmt.Sprintf("%s/%s/%s", Full(), GOOS, GOARCH) +} + func ImplementationLower() string { return strings.ToLower(Implementation) }