I’m currently looking into Go and have hit the following error while trying to run proto:`protoc-gen-go` is not recognized as an internal or external command
I am using Windows and have installed the required libraries:
go get -u github.com/golang/protobuf/proto go get -u github.com/golang/protobuf/protoc-gen-go
In my case the issue turned out to be that proto-gen hadn’t been added to my path: E:\repos\gocode\bin
Note that the new path won’t be available until you restart your terminal.
A subsequent error I encountered was the following:
'protoc-gen-go-grpc' is not recognized as an internal or external command,
operable program or batch file.
I just had to run the following to resolve it:
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest