I am using go version 1.13.1
, and now I cannot update my dependecy module to the latest minor version using go mod
, I made simple repo for learning dependency management on github.com/clavinjune/testng
and made a project that depends on it called moduser
.
The latest minor version of testng
is v1.4.0
┌─[ ~/Public/testng ]─[ git:master ]
└─[ 22:09:19 ] $ git tag -l
v1.0.0
v1.1.0
v1.2.0
v1.3.0
v1.4.0
and moduser
still using v1.3.0
┌─[ ~/Public/moduser ]
└─[ 22:09:06 ] $ go list -m all
moduser
github.com/clavinjune/testng v1.3.0
when I want to update the dependency I run this command
┌─[ ~/Public/moduser ]
└─[ 22:20:17 ] $ go get -v -u github.com/clavinjune/testng
┌─[ ~/Public/moduser ]
└─[ 22:20:28 ] $ go get -v -u github.com/clavinjune/testng@latest
But it doesn't downloading the v1.4.0
.
Is there any wrong command that I run?
If you are using the default public proxy ( proxy.golang.org
), it has a cache on the mapping from latest
to a specific version.
If you want to fetch a specific version, you can either pass that version explicitly to go get
:
go get -d github.com/clavinjune/testng@v1.4.0
or temporarily set GONOPROXY
to bypass the cache:
GONOPROXY=github.com/clavinjune go get -d github.com/clavinjune/testng@latest
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.