Do go get a repository without updating his internal relationships.
-
When I do
go get
I need a repository (my separate repository), instead of just pulling up all the dependence, he's updating the versions of the negligible internal dependence of the repository that I'm pulling and downloading them. Such tamps, one day it breaks the assembly.How can I do that?
go get
Repository, without updating his internal ties? Or maybe there's an internal mechanism that will prevent the updating and downloading of inconsistent versions.
-
In this example, the main module depends on A 1.0 and B 2.1.
Since B 2.1 is dependent on A 1.1, this version A will be used.
and used A 1.1, and in turn it uses C 1.1.Final list of relationships:
A 1.1
B 2.1
C 1.1Now you understand why
go get
orgo mod tidy
updating unnecessary dependence?
You can try to use excluding or replacerequire ( github.com/dep/one v1.0.0 github.com/dep/two/v2 v2.3.0 github.com/dep/other v0.0.0-20180523231146-b3f5c0f6e5f1 github.com/dep/legacy v2.0.0+incompatible )
exclude github.com/dep/legacy v1.9.2
replace github.com/dep/one => github.com/fork/oneexclude - prohibits the use of a certain version of the module
replace - one module on another