Closed Saurabh-Thakre closed 2 years ago
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).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!
and we'll verify it.
ℹ️ Googlers: Go here for more info.
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).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!
and we'll verify it.
ℹ️ Googlers: Go here for more info.
@googlebot I signed it!
CLAs look good, thanks!
ℹ️ Googlers: Go here for more info.
Hey @Saurabh-Thakre thanks for the PR. I think this all depends on the version of Go you are using. Which version do you currently have installed out of curiosity? I believe with Go 1.17 the suggestion is to use the @version
syntax when installing binaries. This way it can work both in and out of the context of a module.
Hey @Saurabh-Thakre thanks for the PR. I think this all depends on the version of Go you are using. Which version do you currently have installed out of curiosity? I believe with Go 1.17 the suggestion is to use the
@version
syntax when installing binaries. This way it can work both in and out of the context of a module.
Hey @codyoss, ohh it depends on the Go version, I thought this at first. by the way, I'm on go version go1.15.8 linux/amd64
. The following has got me confused somehow
does it make sense if we modify it like this. Just a suggestion for a better understanding
Does the provided command for your version of Go work for you? GO111MODULE=on go get github.com/golang/mock/mockgen@v1.6.0
?
For what it's worth, in Go 1.17, it might make sense to use the new module-aware go run
syntax with versioning:
//go:generate go run github.com/golang/mock/mockgen@v1.6.0 -package ... -source ... -destination ...
We moved to that format since it made more sense to us to have a generic go generate ./...
step in our CI/CD pipelines that didn't require us to do a go get
for mockgen beforehand
Does the provided command for your version of Go work for you?
GO111MODULE=on go get github.com/golang/mock/mockgen@v1.6.0
?
Yeah it works as expected !
I am going to close this because I believe this is working as expected it seems.
go install
doesn't withpath@version
and can only be used withgo get
syntax. Following is the error you get when you usego install github.com/golang/mock/mockgen@v1.6.0
So removing @version