Adib Rastegarnia
Adib Rastegarnia

Reputation: 584

How can I get master branch of a dependency when using Go modules

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

Answers (1)

georgeok
georgeok

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

Related Questions