Reputation: 584
I am using Go-modules for a project. When I retrieve the dependency for a package, it retrieves an old release. How can I get the code in the master branch?
Upvotes: 5
Views: 11313
Reputation: 5736
Use:
go get foo@master
go get [email protected] //for v1.2.3 tag
go get foo@master // for master
go get foo@e3702bed2 // for a specific commit
There are some more details about versioning here:
https://github.com/golang/go/wiki/Modules#daily-workflow
Upvotes: 16