Closed vctqs1 closed 4 years ago
Can you give me example for this situation?. I'm new member.
@vctqs1 I gave you a short answer because you ignored the helpful instructions in the issue template which ask you to come to the Gophers slack and ask for help if you're having problems getting started. This issue tracker is not useful for this kind of debugging and assistance.
In this case, maybe try starting with https://github.com/johanbrandhorst/grpc-gateway-boilerplate which has everything set up for you. If you still need help, join the gophers slack.
@vctqs1 I gave you a short answer because you ignored the helpful instructions in the issue template which ask you to come to the Gophers slack and ask for help if you're having problems getting started. This issue tracker is not useful for this kind of debugging and assistance.
In this case, maybe try starting with https://github.com/johanbrandhorst/grpc-gateway-boilerplate which has everything set up for you. If you still need help, join the gophers slack.
I installed it according to the instructions but this is still not effective
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger go get -u github.com/golang/protobuf/protoc-gen-go
I was able to resolve this by doing:
-I=$GOPATH/pkg/mod/github.com/grpc-ecosystem/grpc-gateway@v1.12.1/third_party/googleapis
That version number will change depending on what you have installed.
ENV: MacOS
protoc -I/usr/local/include -I. \ -I$GOPATH/src \ -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ --go_out=plugins=grpc:pkg/api \ api/*.proto
ERROR:
oogle/api/annotations.proto: File not found.
product.proto: Import "google/api/annotations.proto" was not found or had errors.
/Users/macbookpro/Go/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis: warning: directory does not exist.
google/api/annotations.proto: File not found.