Skip to content
This repository was archived by the owner on Mar 4, 2022. It is now read-only.
This repository was archived by the owner on Mar 4, 2022. It is now read-only.

Support Apple arm64 arch #574

Open
Open
@zephyrpathsofglory

Description

@zephyrpathsofglory

when I run prototool generate in my Macbook pro M1 chip, it prints unsupported value for runtime.GOARCH: arm64, then I searched the repo and found this function in internal/protoc/downloader.go:

func getUnameSUnameMPaths(goos string, goarch string) (string, string, error) {
	var unameS string
	switch goos {
	case "darwin":
		unameS = "Darwin"
	case "linux":
		unameS = "Linux"
	default:
		return "", "", fmt.Errorf("unsupported value for runtime.GOOS: %v", goos)
	}
	var unameM string
	switch goarch {
	case "amd64":
		unameM = "x86_64"
	default:
		return "", "", fmt.Errorf("unsupported value for runtime.GOARCH: %v", goarch)
	}
	return unameS, unameM, nil
}

So I guess it is a bug of prototool and composed this issue to ask for some help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions