Skip to content

Commit

Permalink
go: download appropriate arch binary
Browse files Browse the repository at this point in the history
  • Loading branch information
markelog committed Oct 10, 2024
1 parent 59a5211 commit 1edefd8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/commands/version/verison.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var Command = &cobra.Command{
}

// Version number
const Version = "0.8.6"
const Version = "0.9.0"

// Runner
func run(c *cobra.Command, args []string) {
Expand Down
8 changes: 7 additions & 1 deletion plugins/golang/golang.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,18 @@ func augmentSlice(result []string, node *goquery.Selection) []string {

func getPlatform() (string, error) {
if runtime.GOOS == "linux" {
if runtime.GOARCH == "arm64" {
return "linux-arm64", nil
}
return "linux-amd64", nil
}

if runtime.GOOS == "darwin" {
if runtime.GOARCH == "arm64" {
return "darwin-arm64", nil
}
return "darwin-amd64", nil
}

return "", errors.New("Not supported envionment")
return "", errors.New("Not supported environment")
}

0 comments on commit 1edefd8

Please sign in to comment.