Go get pkg with particular version

Let’s say I want to get grpc package and all its dependencies, I would do -
go get -u google.golang.org/grpc

The issue with this is that it always gets the latest package. I would like to get a package
with a certain version. “go get -u google.golang.org/grpc@1.2.0” does not work. I know
after getting the above package, I can always go to the downloaded pkg and do “git checkout v1.2.0”.
Just wanted to make sure if there is a better way.

1 Like

Hey, I think this stackoverflow question lists some pretty good methods:
https://stackoverflow.com/questions/24855081/how-do-i-import-a-specific-version-of-a-package-using-go-get

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.