-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update protoc-gen-grpc-gateway go get command #1929
Conversation
go get github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway returns an error: Tue Jan 26 10:03 PM ~: go get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway package github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway: cannot find package "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway" in any of: /usr/lib/go-1.13/src/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway (from $GOROOT) /home/userhome/go/src/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway (from $GOPATH
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
Codecov Report
@@ Coverage Diff @@
## master #1929 +/- ##
=======================================
Coverage 57.96% 57.96%
=======================================
Files 34 34
Lines 3771 3771
=======================================
Hits 2186 2186
Misses 1311 1311
Partials 274 274 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @seantcanavan, thanks for your contribution, unfortunately, this change is not an appropriate fix. The error you're seeing happens when trying to go get
the grpc-gateway in GOPATH mode. The correct fix here is to set GO111MODULE=on, which will be the default in 1.16. Can you try the suggestion and confirm it fixes your issue? It works for me locally.
@@ -30,7 +30,7 @@ We will be using a Go gRPC server in the examples, so please install Go first fr | |||
After installing Go, use `go get` to download the following packages: | |||
|
|||
```sh | |||
$ go get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway | |||
$ go get github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ go get github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway | |
$ GO111MODULE=on go get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway |
@johanbrandhorst thanks for the help! my project was using go modules but I didn't realize I had to set it globally. I'm using 1.13.8 which is the default for ubuntu 20 right now. I appreciate your patience with all this |
go get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway returns an error:
Tue Jan 26 10:03 PM ~: go get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway
package github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway: cannot find package "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway" in any of:
/usr/lib/go-1.13/src/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway (from $GOROOT)
/home/userhome/go/src/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway (from $GOPATH
References to other Issues or PRs
Have you read the Contributing Guidelines?
Brief description of what is fixed or changed
Other comments