Command:
protoc --proto_path=./proto --go_out=. --go-grpc_out=. --go-grpc_opt=require_unimplemented_servers=false proto/*.proto
Instruction Command:
evans -p PORT -r
- Wrong or undefined files saving path:
ERROR:
WARNING: Malformed 'go_package' option in "proto/logger.proto", please specify:
option go_package = "./;__";
Solution option:
option go_package = "./pb";
- Not found program (source):
ERROR:
protoc-gen-go-grpc: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--go-grpc_out: protoc-gen-go-grpc: Plugin failed with status code 1.
Solution option:
- Install the protocol compiler plugins for Go using the following commands:
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]
- Update your PATH:
export PATH="$PATH:$(go env GOPATH)/bin"