Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在为一个项目使用 Go-modules。当我检索包的依赖项时,它会检索旧版本。如何在 master 分支中获取代码?
利用:
go get foo@master
go get foo@v1.2.3 //for v1.2.3 tag go get foo@master // for master go get foo@e3702bed2 // for a specific commit
这里有一些关于版本控制的更多细节:
https://github.com/golang/go/wiki/Modules#daily-workflow