Skip to content

Commit

Permalink
move to proto func
Browse files Browse the repository at this point in the history
  • Loading branch information
Savid committed Oct 7, 2024
1 parent a12193c commit ae5960f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
},
}

Expand Down
4 changes: 4 additions & 0 deletions pkg/proto/xatu/xatu.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit ae5960f

Please sign in to comment.